Package org.onosproject.cluster
Class ClusterEvent
- java.lang.Object
-
- org.onosproject.event.AbstractEvent<ClusterEvent.Type,ControllerNode>
-
- org.onosproject.cluster.ClusterEvent
-
- All Implemented Interfaces:
Event<ClusterEvent.Type,ControllerNode>
public class ClusterEvent extends AbstractEvent<ClusterEvent.Type,ControllerNode>
Describes cluster-related event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusterEvent.InstanceTypestatic classClusterEvent.TypeType of cluster-related events.
-
Constructor Summary
Constructors Constructor Description ClusterEvent(ClusterEvent.Type type, ControllerNode instance)Creates an event of a given type and for the specified instance and the current time.ClusterEvent(ClusterEvent.Type type, ControllerNode instance, long time)Creates an event of a given type and for the specified device and time.ClusterEvent(ClusterEvent.Type type, ControllerNode instance, long time, ClusterEvent.InstanceType instanceType)Creates an event of a given type and for the specified device and time.ClusterEvent(ClusterEvent.Type type, ControllerNode instance, ClusterEvent.InstanceType instanceType)Creates an event of a given type and for the specified instance and the current time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()ClusterEvent.InstanceTypeinstanceType()Returns the instance type subject.StringtoString()-
Methods inherited from class org.onosproject.event.AbstractEvent
subject, time, type
-
-
-
-
Constructor Detail
-
ClusterEvent
public ClusterEvent(ClusterEvent.Type type, ControllerNode instance)
Creates an event of a given type and for the specified instance and the current time.- Parameters:
type- cluster event typeinstance- cluster device subject
-
ClusterEvent
public ClusterEvent(ClusterEvent.Type type, ControllerNode instance, long time)
Creates an event of a given type and for the specified device and time.- Parameters:
type- device event typeinstance- event device subjecttime- occurrence time
-
ClusterEvent
public ClusterEvent(ClusterEvent.Type type, ControllerNode instance, ClusterEvent.InstanceType instanceType)
Creates an event of a given type and for the specified instance and the current time.- Parameters:
type- cluster event typeinstance- cluster device subjectinstanceType- instance type
-
ClusterEvent
public ClusterEvent(ClusterEvent.Type type, ControllerNode instance, long time, ClusterEvent.InstanceType instanceType)
Creates an event of a given type and for the specified device and time.- Parameters:
type- device event typeinstance- event device subjecttime- occurrence timeinstanceType- instance type
-
-
Method Detail
-
instanceType
public ClusterEvent.InstanceType instanceType()
Returns the instance type subject.- Returns:
- instance type subject or UNKNOWN if the event is not instance type specific.
-
toString
public String toString()
- Overrides:
toStringin classAbstractEvent<ClusterEvent.Type,ControllerNode>
-
-