Package org.apache.solr.cluster.events
Interface ClusterEventProducer
-
- All Superinterfaces:
AutoCloseable
,Closeable
,ClusterSingleton
- All Known Implementing Classes:
ClusterEventProducerBase
,ClusterEventProducerFactory
,DefaultClusterEventProducer
,DelegatingClusterEventProducer
,NoOpProducer
public interface ClusterEventProducer extends ClusterSingleton, Closeable
Component that producesClusterEvent
instances.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.cloud.ClusterSingleton
ClusterSingleton.State
-
-
Field Summary
Fields Modifier and Type Field Description static String
PLUGIN_NAME
Unique name for the registration of a plugin-based implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
getName()
Unique name of this singleton.void
registerListener(ClusterEventListener listener, ClusterEvent.EventType... eventTypes)
Register an event listener for processing the specified event types.default void
unregisterListener(ClusterEventListener listener)
Unregister an event listener for all event types.void
unregisterListener(ClusterEventListener listener, ClusterEvent.EventType... eventTypes)
Unregister an event listener for specified event types.-
Methods inherited from interface org.apache.solr.cloud.ClusterSingleton
getState, start, stop
-
-
-
-
Field Detail
-
PLUGIN_NAME
static final String PLUGIN_NAME
Unique name for the registration of a plugin-based implementation.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
default String getName()
Description copied from interface:ClusterSingleton
Unique name of this singleton. Used for registration.- Specified by:
getName
in interfaceClusterSingleton
-
registerListener
void registerListener(ClusterEventListener listener, ClusterEvent.EventType... eventTypes)
Register an event listener for processing the specified event types.- Parameters:
listener
- non-null listener. If the same instance of the listener is already registered for some event types then it will be also registered for additional event types specified in this call.eventTypes
- event types that this listener is being registered for. If this is null or empty then all types will be used.
-
unregisterListener
default void unregisterListener(ClusterEventListener listener)
Unregister an event listener for all event types.- Parameters:
listener
- non-null listener.
-
unregisterListener
void unregisterListener(ClusterEventListener listener, ClusterEvent.EventType... eventTypes)
Unregister an event listener for specified event types.- Parameters:
listener
- non-null listener.eventTypes
- event types from which the listener will be unregistered. If this is null or empty then all event types will be used
-
-