|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--solar.service.pack.proto.GroupBufferHandle
Manages a group of subscriptions, such as those coming from same link.
Field Summary | |
protected java.lang.Object |
_plock
|
protected java.util.Hashtable |
_policy
|
protected java.util.Hashtable |
_privateBuffers
|
protected Id |
_pubId
|
protected Buffer |
_sharedBuffer
|
protected int |
_size
|
protected java.lang.Object |
_subkey
|
protected boolean |
_suspended
|
protected int |
_suspendLimit
|
protected cern.jet.random.Uniform |
_unigen
|
Constructor Summary | |
GroupBufferHandle(Id pubId,
java.lang.Object subkey,
int suspendLimit)
|
Method Summary | |
void |
addSubscriber(Id subId,
java.lang.Object policy,
Buffer buffer)
Add a subscriber with specified policy. |
BufferedEvent |
getBufferedEvent()
Return the next event from buffers in this handle. |
Id |
getPubId()
Return the publisher ID of this handle. |
java.lang.Object |
getSubKey()
Return the key of subscription, ID or link address. |
boolean |
hasSubscriber(Id subId)
Return whether this handle contains specified subscriber. |
boolean |
isSuspended()
Return whether this handle is suspended. |
void |
pack()
Pack the buffers in this handle. |
void |
putEvent(Id pubId,
Id subId,
Event evt)
Put a subscribed event into this handle. |
void |
putEvents(Id pubId,
Id subId,
Buffer buffer)
Put a list of events into this handle. |
private void |
putSubEvent(Id subId,
Event evt)
|
private void |
putSubEvents(Id subId,
Buffer buffer)
|
Buffer |
removeSubscriber(Id subId)
Remove an existing subscriber and return its associated buffer. |
void |
resume()
Resume all buffers in this handle to output. |
int |
size()
Total number of events in this handle. |
void |
suspend()
Suspend all buffers in this handle from output. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected cern.jet.random.Uniform _unigen
protected int _size
protected Id _pubId
protected java.lang.Object _subkey
protected java.util.Hashtable _policy
protected Buffer _sharedBuffer
protected boolean _suspended
protected int _suspendLimit
protected java.lang.Object _plock
protected java.util.Hashtable _privateBuffers
Constructor Detail |
public GroupBufferHandle(Id pubId, java.lang.Object subkey, int suspendLimit)
Method Detail |
public int size()
BufferHandle
size
in interface BufferHandle
public Id getPubId()
BufferHandle
getPubId
in interface BufferHandle
public java.lang.Object getSubKey()
BufferHandle
getSubKey
in interface BufferHandle
public boolean hasSubscriber(Id subId)
BufferHandle
hasSubscriber
in interface BufferHandle
public void addSubscriber(Id subId, java.lang.Object policy, Buffer buffer)
BufferHandle
addSubscriber
in interface BufferHandle
public Buffer removeSubscriber(Id subId)
BufferHandle
removeSubscriber
in interface BufferHandle
public void putEvent(Id pubId, Id subId, Event evt) throws BufferFullException
BufferHandle
putEvent
in interface BufferHandle
BufferFullException
public void putEvents(Id pubId, Id subId, Buffer buffer) throws BufferFullException
BufferHandle
putEvents
in interface BufferHandle
BufferFullException
public BufferedEvent getBufferedEvent()
BufferHandle
getBufferedEvent
in interface BufferHandle
public void pack()
BufferHandle
pack
in interface BufferHandle
public void suspend()
BufferHandle
suspend
in interface BufferHandle
public void resume()
BufferHandle
resume
in interface BufferHandle
public boolean isSuspended()
BufferHandle
isSuspended
in interface BufferHandle
public java.lang.String toString()
toString
in class java.lang.Object
private void putSubEvent(Id subId, Event evt) throws BufferFullException
BufferFullException
private void putSubEvents(Id subId, Buffer buffer) throws BufferFullException
BufferFullException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |