@PublicAPI public class RMInitialState extends Object implements Serializable
RMMonitoring
by
the method RMMonitoring.addRMEventListener(RMEventListener listener, RMEventType... events)
,
and get an initial state which is the snapshot of Resource Manager state, with its
nodes and NodeSources.RMNodeEvent
,
RMNodeSourceEvent
,
RMMonitoring
,
Serialized FormModifier and Type | Field and Description |
---|---|
static Long |
EMPTY_STATE |
Constructor and Description |
---|
RMInitialState() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Collection<? extends RMEvent> toAdd) |
RMStateDelta |
cloneAndFilter(long counterKnownByClient)
Clones current state events, but keep only those events which has counter bigger than provided 'filter'
Event counter can take values [0, +).
|
RMStateFull |
cloneAndFilterNotRemovedOnly()
Clones current state events, but keep only those events which was not removed.
|
long |
getLatestCounter() |
List<RMNodeEvent> |
getNodeEvents() |
List<RMNodeSourceEvent> |
getNodeSourceEvents() |
void |
nodeAdded(RMNodeEvent event) |
void |
nodeRemoved(RMNodeEvent event) |
void |
nodeSourceAdded(RMNodeSourceEvent event) |
void |
nodeSourceRemoved(RMNodeSourceEvent event) |
void |
nodeSourceStateChanged(RMNodeSourceEvent event) |
void |
nodeStateChanged(RMNodeEvent event) |
protected void |
update(RMEvent event) |
public static final Long EMPTY_STATE
public void addAll(Collection<? extends RMEvent> toAdd)
public List<RMNodeEvent> getNodeEvents()
public List<RMNodeSourceEvent> getNodeSourceEvents()
public long getLatestCounter()
public void nodeAdded(RMNodeEvent event)
public void nodeStateChanged(RMNodeEvent event)
public void nodeRemoved(RMNodeEvent event)
public void nodeSourceAdded(RMNodeSourceEvent event)
public void nodeSourceRemoved(RMNodeSourceEvent event)
public void nodeSourceStateChanged(RMNodeSourceEvent event)
protected void update(RMEvent event)
public RMStateDelta cloneAndFilter(long counterKnownByClient)
counterKnownByClient
- latest counter associated with event known by clientpublic RMStateFull cloneAndFilterNotRemovedOnly()