Class EventImpl
java.lang.Object
org.infinispan.notifications.cachemanagerlistener.event.impl.EventImpl
- All Implemented Interfaces:
CacheStartedEvent
,CacheStoppedEvent
,ConfigurationChangedEvent
,Event
,MergeEvent
,SitesViewChangedEvent
,ViewChangedEvent
public class EventImpl
extends Object
implements CacheStartedEvent, CacheStoppedEvent, ViewChangedEvent, MergeEvent, ConfigurationChangedEvent, SitesViewChangedEvent
Implementation of cache manager events
- Since:
- 4.0
- Author:
- Manik Surtani
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.notifications.cachemanagerlistener.event.ConfigurationChangedEvent
ConfigurationChangedEvent.EventType
Nested classes/interfaces inherited from interface org.infinispan.notifications.cachemanagerlistener.event.Event
Event.Type
-
Constructor Summary
ConstructorDescriptionEventImpl
(String cacheName, EmbeddedCacheManager cacheManager, Event.Type type, List<Address> newMemberList, List<Address> oldMemberList, Address localAddress, int viewId) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the current list of members.Gets the previous list of members.getSites()
getType()
int
Get JGroups view id.int
hashCode()
boolean
void
setCacheManager
(EmbeddedCacheManager cacheManager) void
setCacheName
(String cacheName) void
void
void
void
setLocalAddress
(Address localAddress) void
setMergeView
(boolean b) void
setNewMembers
(List<Address> newMembers) void
setOldMembers
(List<Address> oldMembers) void
setSitesDown
(Collection<String> sitesDown) void
setSitesUp
(Collection<String> sitesUp) void
setSitesView
(Collection<String> sitesView) void
setSubgroupsMerged
(List<List<Address>> subgroupsMerged) void
setType
(Event.Type type) void
setViewId
(int viewId) toString()
-
Constructor Details
-
EventImpl
public EventImpl() -
EventImpl
public EventImpl(String cacheName, EmbeddedCacheManager cacheManager, Event.Type type, List<Address> newMemberList, List<Address> oldMemberList, Address localAddress, int viewId)
-
-
Method Details
-
getCacheName
- Specified by:
getCacheName
in interfaceCacheStartedEvent
- Specified by:
getCacheName
in interfaceCacheStoppedEvent
-
setCacheName
-
getCacheManager
- Specified by:
getCacheManager
in interfaceEvent
-
setCacheManager
-
getType
-
setType
-
getNewMembers
Description copied from interface:ViewChangedEvent
Gets the current list of members.- Specified by:
getNewMembers
in interfaceViewChangedEvent
- Returns:
- the new view associated with this view change. List cannot be null.
-
setNewMembers
-
setOldMembers
-
getOldMembers
Description copied from interface:ViewChangedEvent
Gets the previous list of members.- Specified by:
getOldMembers
in interfaceViewChangedEvent
- Returns:
- the old view associated with this view change. List cannot be null.
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceViewChangedEvent
-
getViewId
public int getViewId()Description copied from interface:ViewChangedEvent
Get JGroups view id.- Specified by:
getViewId
in interfaceViewChangedEvent
- Returns:
-
setViewId
public void setViewId(int viewId) -
setLocalAddress
-
equals
-
hashCode
public int hashCode() -
toString
-
setSubgroupsMerged
-
getSubgroupsMerged
- Specified by:
getSubgroupsMerged
in interfaceMergeEvent
-
isMergeView
public boolean isMergeView()- Specified by:
isMergeView
in interfaceViewChangedEvent
-
setMergeView
public void setMergeView(boolean b) -
setConfigurationEventType
-
setConfigurationEntityType
-
setConfigurationEntityName
-
getConfigurationEventType
- Specified by:
getConfigurationEventType
in interfaceConfigurationChangedEvent
-
getConfigurationEntityType
- Specified by:
getConfigurationEntityType
in interfaceConfigurationChangedEvent
-
getConfigurationEntityName
- Specified by:
getConfigurationEntityName
in interfaceConfigurationChangedEvent
-
getSites
- Specified by:
getSites
in interfaceSitesViewChangedEvent
- Returns:
- The current list of connected sites.
-
getJoiners
- Specified by:
getJoiners
in interfaceSitesViewChangedEvent
- Returns:
- The list of new connected sites.
-
getLeavers
- Specified by:
getLeavers
in interfaceSitesViewChangedEvent
- Returns:
- The list of sites that have disconnected.
-
setSitesView
-
setSitesUp
-
setSitesDown
-