use of com.ctrip.xpipe.redis.console.notifier.EventType in project x-pipe by ctripcorp.
the class DefaultClusterDeleteEventListener method update.
@Override
public void update(Object args, Observable observable) {
EventType type = (EventType) args;
if (!(observable instanceof ClusterDeleteEvent) || type != EventType.DELETE) {
logger.info("[update] observable object not ShardDeleteEvent, skip. observable: {}, args: {}", observable.getClass().getName(), args.getClass().getName());
return;
}
ClusterDeleteEvent clusterDeleteEvent = (ClusterDeleteEvent) observable;
for (ShardEvent shardEvent : clusterDeleteEvent.getShardEvents()) {
shardEvent.onEvent();
}
}
use of com.ctrip.xpipe.redis.console.notifier.EventType in project x-pipe by ctripcorp.
the class ShardDeleteEventListener4Sentinel method update.
@Override
public void update(Object args, Observable observable) {
EventType type = (EventType) args;
if (!(observable instanceof ShardDeleteEvent) || type != EventType.DELETE) {
logger.info("[update] observable object not ShardDeleteEvent, skip. observable: {}, args: {}", observable.getClass().getName(), args.getClass().getName());
return;
}
ShardDeleteEvent shardDeleteEvent = (ShardDeleteEvent) observable;
sentinelManager.removeShardSentinelMonitors(shardDeleteEvent);
}
Aggregations