FreeHEP API
Version current

hep.aida.ref.remote.basic
Class ServerQueue

java.lang.Object
  extended byhep.aida.ref.remote.basic.ServerQueue

public class ServerQueue
extends Object

This is thread-safe queue for UpdateEvents. Events can be accumulated in the queue and then retrieved in one chunk. Mainly used on the server side.

Author:
serbo
Source Code:
ServerQueue.java

Field Summary
protected  boolean keepRunning
           
protected  List queue
           
 
Constructor Summary
ServerQueue()
          Creates a new instance of UpdatableQueue
 
Method Summary
protected  void addToQueue(UpdateEvent event)
          This method adds event to the queue and does some cleanup, like remove multiple update events for the same path, etc.
 void close()
          Once the ServerQueue is closed, it can not be restarted again.
 UpdateEvent[] getEvents()
          Returns the array of events that are currently in the queue.
 void schedule(UpdateEvent event)
          Add events to the queue.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queue

protected List queue

keepRunning

protected boolean keepRunning
Constructor Detail

ServerQueue

public ServerQueue()
Creates a new instance of UpdatableQueue

Method Detail

close

public void close()
Once the ServerQueue is closed, it can not be restarted again.


size

public int size()

schedule

public void schedule(UpdateEvent event)
Add events to the queue.


getEvents

public UpdateEvent[] getEvents()
Returns the array of events that are currently in the queue. Also deletes those events from the queue. Never returns null.


addToQueue

protected void addToQueue(UpdateEvent event)
This method adds event to the queue and does some cleanup, like remove multiple update events for the same path, etc.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.