com.alachisoft.ncache.client.CacheEventArg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ncache-professional-client Show documentation
Show all versions of ncache-professional-client Show documentation
NCache Professional client for java.
package com.alachisoft.ncache.client;
import com.alachisoft.ncache.client.internal.caching.CacheItemRemovedReason;
import com.alachisoft.ncache.runtime.events.EventType;
/**
* This object is received when an even is raised and delegate is executed
* CacheEventArg contains necessary information to identify the event and perform necessary actions accordingly.
* It inherits which is also a parent of
* This class is consistent for both selective and general events
*/
public class CacheEventArg extends EventArg {
private CacheItemRemovedReason _reason; //For remove only
private CacheEventDescriptor _descriptor;
public CacheEventArg(String key, String cachename, EventType eventType, EventCacheItem item, CacheEventDescriptor discriptor) {
super(cachename, eventType, item);
_descriptor = discriptor;
}
public CacheEventArg(String key, String cachename, EventType eventType, EventCacheItem item, CacheEventDescriptor discriptor, EventCacheItem olditem) {
super(cachename, eventType, item, olditem);
_descriptor = discriptor;
}
public CacheEventArg(String key, String cachename, EventType eventType, EventCacheItem item, CacheEventDescriptor discriptor, CacheItemRemovedReason reason) {
super(cachename, eventType, item);
_reason = reason;
_descriptor = discriptor;
}
/**
* Only applicable for general events otherwise it will be null
*/
public final CacheEventDescriptor getDescriptor() {
return _descriptor;
}
public final void setDescriptor(CacheEventDescriptor value) {
_descriptor = value;
}
/**
* Only applicable for
* Otherwise default value is DependencyChanged
*/
public final CacheItemRemovedReason getCacheItemRemovedReason() {
return _reason;
}
public final void setItemRemovedReason(CacheItemRemovedReason value) {
_reason = value;
}
}