public abstract class ServiceEvent extends RemoteEvent
Sequence numbers for a given event ID are strictly increasing. If there is no gap between two sequence numbers, no events have been missed; if there is a gap, events might (but might not) have been missed. For example, a gap might occur if the lookup service crashes, even if no events are lost due to the crash.
Modifier and Type | Field and Description |
---|---|
protected ServiceID |
serviceID
ServiceID of the item that triggered the event.
|
protected int |
transition
One of ServiceRegistrar.TRANSITION_*MATCH_*MATCH.
|
eventID, handback, miHandback, seqNum
source
Constructor and Description |
---|
ServiceEvent(AtomicSerial.GetArg arg) |
ServiceEvent(Object source,
long eventID,
long seqNo,
MarshalledInstance miHandback,
ServiceID serviceID,
int transition)
Simple constructor.
|
ServiceEvent(Object source,
long eventID,
long seqNo,
MarshalledObject handback,
ServiceID serviceID,
int transition)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
getBootstrapProxy()
Returns a bootstrap proxy from which the new state of the item can be
retrieved.
|
ServiceID |
getServiceID()
Returns the serviceID of the item that triggered the event.
|
abstract ServiceItem |
getServiceItem()
Returns the new state of the item, or null if the item was deleted
from the lookup service.
|
int |
getTransition()
Returns the singleton transition that triggered the event.
|
String |
toString()
Returns a
String representation of this
ServiceEvent . |
getID, getRegistrationInstance, getRegistrationObject, getSequenceNumber
getSource
protected final ServiceID serviceID
protected final int transition
public ServiceEvent(AtomicSerial.GetArg arg) throws IOException
IOException
@Deprecated public ServiceEvent(Object source, long eventID, long seqNo, MarshalledObject handback, ServiceID serviceID, int transition)
source
- the source of this ServiceEventeventID
- the registration eventIDseqNo
- the sequence number of this eventhandback
- the client handbackserviceID
- the serviceID of the item that triggered the eventtransition
- the transition that triggered the eventpublic ServiceEvent(Object source, long eventID, long seqNo, MarshalledInstance miHandback, ServiceID serviceID, int transition)
source
- the source of this ServiceEventeventID
- the registration eventIDseqNo
- the sequence number of this eventmiHandback
- the client handbackserviceID
- the serviceID of the item that triggered the eventtransition
- the transition that triggered the eventpublic ServiceID getServiceID()
public int getTransition()
public String toString()
String
representation of this
ServiceEvent
.toString
in class EventObject
String
representation of this objectpublic abstract ServiceItem getServiceItem()
public Object getBootstrapProxy()
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.