Package org.apache.sling.discovery

# Enum TopologyEvent.Type

java.lang.Object
java.lang.Enum<TopologyEvent.Type>
org.apache.sling.discovery.TopologyEvent.Type

All Implemented Interfaces:
  `Serializable`, `Comparable<TopologyEvent.Type>`

Enclosing class:
  TopologyEvent

public static enum TopologyEvent.Type extends Enum<TopologyEvent.Type>

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`PROPERTIES_CHANGED`
One or many properties have been changed on an instance which is part of the topology.
`TOPOLOGY_CHANGED`
Informs the service about a state change in the topology.
`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.
`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).

## Method Summary

Modifier and Type
Method
Description
`static TopologyEvent.Type`
`valueOf(String name)`
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.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### TOPOLOGY_INIT

public static final TopologyEvent.Type 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

public static final TopologyEvent.Type 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

public static final TopologyEvent.Type 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

public static final TopologyEvent.Type 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

public static TopologyEvent.Type[] 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

public static TopologyEvent.Type valueOf(String name)
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 name
  `NullPointerException` - if the argument is null