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,
               MastershipInfo mastershipInfo)
Creates an event of a given type and for the specified device,
 role information, and the current time. 
 | 
MastershipEvent(MastershipEvent.Type type,
               DeviceId device,
               MastershipInfo mastershipInfo,
               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(Object obj)  | 
int | 
hashCode()  | 
MastershipInfo | 
mastershipInfo()
Returns the mastership info. 
 | 
RoleInfo | 
roleInfo()
Deprecated. 
 
since 1.14 
 | 
String | 
toString()  | 
subject, time, typepublic MastershipEvent(MastershipEvent.Type type, DeviceId device, MastershipInfo mastershipInfo)
type - mastership event typedevice - event device subjectmastershipInfo - mastership infopublic MastershipEvent(MastershipEvent.Type type, DeviceId device, MastershipInfo mastershipInfo, long time)
type - mastership event typedevice - event device subjectmastershipInfo - mastership informationtime - occurrence timepublic MastershipInfo mastershipInfo()
@Deprecated public RoleInfo roleInfo()
public String toString()
toString in class AbstractEvent<MastershipEvent.Type,DeviceId>