|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.uci.isr.yancees.server.rmi.NotificationBuffer
public class NotificationBuffer
This buffer schedules events to be notified. The aim is to cope with scalability and high throughput, in order to publish a bunch of events at once, instead of one at a time. This strategy better utilizes the RMI serialization mechanisms and icreases the throughput of the server. A big buffer will allow the server to handle more publish commands per second. However, it will reduce the latency (the time between production and delivery of an event). A low SLEEP_TIME will not permit the buffer to get full, and will reduce the throughput.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
NotificationBuffer(RemoteSubscriberInterface remInt,
SubscriberMediator med)
|
Method Summary | |
---|---|
void |
addObjectToBuffer(java.lang.Object obj)
Method used by the clients of this class to enqueue events in the buffer |
java.lang.Object |
getObjectFromBuffer()
This method should be called when there is some event on the buffer, otherwise, it returns null |
void |
run()
Main logic of this thread |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NotificationBuffer(RemoteSubscriberInterface remInt, SubscriberMediator med)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void addObjectToBuffer(java.lang.Object obj)
event
- public java.lang.Object getObjectFromBuffer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |