FreeHEP API
Version current

hep.aida.ref.remote.corba
Class CorbaServerEventQueue

java.lang.Object
  extended byhep.aida.ref.remote.corba.CorbaServerEventQueue
All Implemented Interfaces:
Runnable

public class CorbaServerEventQueue
extends Object
implements Runnable

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. If TreeClient != null, notifies treeClient about events.

Author:
serbo
Source Code:
CorbaServerEventQueue.java

Field Summary
protected  EventStruct[] emptyEvents
           
protected  boolean keepRunning
           
protected  List queue
           
protected  TreeClient treeClient
           
 
Constructor Summary
CorbaServerEventQueue()
          Creates a new instance of UpdatableQueue
CorbaServerEventQueue(TreeClient treeClient)
           
 
Method Summary
protected  void addToQueue(EventStruct 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.
 EventStruct[] getEvents()
          Returns the array of events that are currently in the queue.
 void run()
          In Duplex mode sends updates to TreeClient
 void schedule(EventStruct 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

emptyEvents

protected EventStruct[] emptyEvents

treeClient

protected TreeClient treeClient
Constructor Detail

CorbaServerEventQueue

public CorbaServerEventQueue()
Creates a new instance of UpdatableQueue


CorbaServerEventQueue

public CorbaServerEventQueue(TreeClient treeClient)
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(EventStruct event)
Add events to the queue.


getEvents

public EventStruct[] 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(EventStruct event)
This method adds event to the queue and does some cleanup, like remove multiple update events for the same path, etc.


run

public void run()
In Duplex mode sends updates to TreeClient

Specified by:
run in interface Runnable

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.