Package org.apache.sling.discovery
Enum TopologyEvent.Type
- All Implemented Interfaces:
Serializable
,Comparable<TopologyEvent.Type>
- Enclosing class:
- TopologyEvent
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOne or many properties have been changed on an instance which is part of the topology.Informs the service about a state change in the topology.Informs the service about the fact that a state change was detected in the topology/cluster and that the new state is in the process of being discovered.Informs the service about the initial topology state - this is only sent once at bind-time and is the first one a TopologyEventListener receives (after the implementation bundle was activated). -
Method Summary
Modifier and TypeMethodDescriptionstatic TopologyEvent.Type
Returns the enum constant of this type with the specified name.static TopologyEvent.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TOPOLOGY_INIT
Informs the service about the initial topology state - this is only sent once at bind-time and is the first one a TopologyEventListener receives (after the implementation bundle was activated). -
TOPOLOGY_CHANGING
Informs the service about the fact that a state change was detected in the topology/cluster and that the new state is in the process of being discovered. Once the discovery is finished, a TOPOLOGY_CHANGED is sent with the new topology view.After receiving a TOPOLOGY_CHANGING and before receiving a TOPOLOGY_CHANGED event a TopologyEventListener cannot make any assumptions wrt the topology whatsoever, including whether or not the local instance is part of it at all (partitioning).
An implementation must always send a TOPOLOGY_CHANGING before a TOPOLOGY_CHANGED.
-
TOPOLOGY_CHANGED
Informs the service about a state change in the topology.A state change includes:
- A joining or leaving instance
- A restart of an instance - or more precisely: when the corresponding implementation bundle is deactivated/activated
- A cluster structure - either its members or the cluster view id - changed. The cluster view id changes when an instance joins, leaves or was restarted (its bundle deactivated/activated)
Note that a TOPOLOGY_CHANGED can also include changes in the properties!
-
PROPERTIES_CHANGED
One or many properties have been changed on an instance which is part of the topology.This event is sent when otherwise the topology remains identical.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-