Package org.onosproject.cluster
Class LeadershipEvent
- java.lang.Object
-
- org.onosproject.event.AbstractEvent<LeadershipEvent.Type,Leadership>
-
- org.onosproject.cluster.LeadershipEvent
-
- All Implemented Interfaces:
Event<LeadershipEvent.Type,Leadership>
public class LeadershipEvent extends AbstractEvent<LeadershipEvent.Type,Leadership>
Describes leadership-related event.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LeadershipEvent.Type
Type of leadership events.
-
Constructor Summary
Constructors Constructor Description LeadershipEvent(LeadershipEvent.Type type, Leadership leadership)
Creates an event of a given type and for the specified instance and the current time.LeadershipEvent(LeadershipEvent.Type type, Leadership leadership, long time)
Creates an event of a given type and for the specified subject and time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.onosproject.event.AbstractEvent
subject, time, type
-
-
-
-
Constructor Detail
-
LeadershipEvent
public LeadershipEvent(LeadershipEvent.Type type, Leadership leadership)
Creates an event of a given type and for the specified instance and the current time.- Parameters:
type
- leadership event typeleadership
- event subject
-
LeadershipEvent
public LeadershipEvent(LeadershipEvent.Type type, Leadership leadership, long time)
Creates an event of a given type and for the specified subject and time.- Parameters:
type
- leadership event typeleadership
- event subjecttime
- occurrence time
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractEvent<LeadershipEvent.Type,Leadership>
-
-