All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alachisoft.ncache.client.EventArg Maven / Gradle / Ivy

package com.alachisoft.ncache.client;

import com.alachisoft.ncache.runtime.events.EventType;

/**
 * Parent of  and 
 * Contains the necessary information related to the event being raised
 */
public abstract class EventArg {
    //private string _key; //an option
    private String _cacheName;
    private EventType _eventType;
    private EventCacheItem _item; //Internal value will be null if fetch data was off, will be completely null if no data upon return was specified
    private EventCacheItem _oldItem; //For insert only
    //public string Key
    //{
    //    get { return _key; }
    //}

    public EventArg(String cacheName, EventType eventType, EventCacheItem item) {
        _cacheName = cacheName;
        //_eventType = eventType;
        _eventType = eventType;
        _item = item;
    }

    public EventArg(String cacheName, EventType eventType, EventCacheItem item, EventCacheItem oldItem) {
        _cacheName = cacheName;
        //_eventType = eventType;
        _eventType = eventType;
        _item = item;
        _oldItem = oldItem;
    }

    public final EventCacheItem getOldItem() {
        return _oldItem;
    }

    public final void setOldItem(EventCacheItem value) {
        _oldItem = value;
    }

    /**
     * Name of the cache the event is raised against
     */
    public final String getCacheName() {
        return _cacheName;
    }

    /**
     * Event Type the event is raised against
     */
    public final EventType getEventType() {
        return _eventType;
    }

    /**
     * Contains the item if the event was registered against  or 
     */
    public final EventCacheItem getItem() {
        return _item;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy