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 class
ClusterEvent.InstanceType
static class
ClusterEvent.Type
Type 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 boolean
equals(Object obj)
int
hashCode()
ClusterEvent.InstanceType
instanceType()
Returns the instance type subject.String
toString()
-
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:
toString
in classAbstractEvent<ClusterEvent.Type,ControllerNode>
-
-