org.sapia.ubik.rmi.server.command
Class InQueue

java.lang.Object
  extended by org.sapia.ubik.rmi.server.command.ExecQueue
      extended by org.sapia.ubik.rmi.server.command.InQueue

public class InQueue
extends ExecQueue

Implements the queue into which incoming Executable instances are inserted before being processed in separate threads.

The Executable instances are in this case expected to be AsyncCommand instances.

As an AsyncCommand is enqueued, an available processing thread handles the command is executed. If no thread is available, then the command sits in the queue until a thread becomes available - and until the command's turn comes - i.e.: this is a queue and commands are treated in a FIFO fashion.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Method Summary
 void shutdown(long timeout)
          Shuts down this instance.
 
Methods inherited from class org.sapia.ubik.rmi.server.command.ExecQueue
add, remove, removeAll, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

shutdown

public void shutdown(long timeout)
              throws java.lang.InterruptedException
Description copied from class: ExecQueue
Shuts down this instance.

Overrides:
shutdown in class ExecQueue
Parameters:
timeout - a timeout in millis. If this queue still has pending objects after the timeout is reached, this method returns.
Throws:
java.lang.InterruptedException


Copyright © 2010 Sapia OSS. All Rights Reserved.