|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrcf.core.concurrent.events.AbstractEventSource
@Revision(value="$Revision: 1.8 $",
date="$Date: 2006/12/11 21:30:50 $",
tag="$Name: $")
public abstract class AbstractEventSourceTODO: Javadoc
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize TODO: equals, hashCode, toString
| Field Summary | |
|---|---|
private int |
sequenceNumber
TODO: Javadoc |
protected EventSyndicate |
syndicate
TODO: Javadoc |
| Constructor Summary | |
|---|---|
AbstractEventSource()
|
|
| Method Summary | |
|---|---|
protected void |
createdSyndicate()
TODO: Javadoc Can override to ensure creation of some things when the event syndicate is created. |
protected void |
destroyedSyndicate()
TODO: Javadoc Can override to add cleanup for when the event syndicate is destroyed. |
int |
getSequenceNumber()
Get the current event sequence number for this source. |
int |
incSequenceNumber()
Get the current event sequence number for this source, and increase it for the next call to EventSource.getSequenceNumber(). |
boolean |
isSyndicated()
Determine if this event source is syndicated; i.e. |
EventSyndicate |
syndicate()
Return the current syndicate for this event source, or allocate one if there isn't one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface rcf.core.concurrent.events.EventSource |
|---|
events |
| Field Detail |
|---|
private volatile int sequenceNumber
protected EventSyndicate syndicate
| Constructor Detail |
|---|
public AbstractEventSource()
| Method Detail |
|---|
protected void createdSyndicate()
protected void destroyedSyndicate()
public final int getSequenceNumber()
EventSource1.
Sequence numbers can be used to guess at the ordering of events, and
to mark the in a log.
getSequenceNumber in interface EventSourcepublic final int incSequenceNumber()
EventSourceEventSource.getSequenceNumber(). Sequence numbers
should be monotonic, but need not have a step size of 1.
Sequence numbers can be used to guess at the ordering of events, and
to mark the in a log.
incSequenceNumber in interface EventSourcepublic boolean isSyndicated()
EventSource
isSyndicated in interface EventSourcetrue if there are one or more EventSinks
registered to receive events from this source.public EventSyndicate syndicate()
EventSourcenull unless
EventSource.events().ImmutableIterable.isEmpty() == true.
syndicate in interface EventSourceEventSink should register
with (EventSyndicate.add(rcf.core.util.reference.Reference, Class))
to receive events from this source.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||