com.alachisoft.ncache.client.util.CacheStatusEvent 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.util;
import com.alachisoft.ncache.client.CacheStatusEventListener;
import com.alachisoft.ncache.client.ClusterEvent;
public class CacheStatusEvent implements CacheStatusEventListener {
private CacheStatusEventListener listener;
protected final Object _syncPoint = new Object();
public CacheStatusEvent(CacheStatusEventListener listener) {
this.listener = listener;
}
@Override
public void onCacheStatusChanged(ClusterEvent event) {
try {
synchronized (_syncPoint) {
this.listener.onCacheStatusChanged(event);
}
} catch (Exception exp) {
throw exp;
}
this.listener.onCacheStatusChanged(event);
}
}