public class MastershipEvent extends AbstractEvent<MastershipEvent.Type,DeviceId>
| Modifier and Type | Class and Description |
|---|---|
static class |
MastershipEvent.Type
Type of mastership events.
|
| Constructor and Description |
|---|
MastershipEvent(MastershipEvent.Type type,
DeviceId device,
RoleInfo info)
Creates an event of a given type and for the specified device,
role information, and the current time.
|
MastershipEvent(MastershipEvent.Type type,
DeviceId device,
RoleInfo info,
long time)
Creates an event of a given type and for the specified device, master,
and time.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
RoleInfo |
roleInfo()
Returns the current role state for the subject.
|
java.lang.String |
toString() |
subject, time, typepublic MastershipEvent(MastershipEvent.Type type, DeviceId device, RoleInfo info)
type - mastership event typedevice - event device subjectinfo - mastership role informationpublic MastershipEvent(MastershipEvent.Type type, DeviceId device, RoleInfo info, long time)
type - mastership event typedevice - event device subjectinfo - role informationtime - occurrence timepublic RoleInfo roleInfo()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class AbstractEvent<MastershipEvent.Type,DeviceId>