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

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

public class OutQueue
extends ExecQueue

This queue stores outgoing Response objects until they are processed.

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 add(Executable cmd)
          Adds an Executable to this queue.
static OutQueue getQueueFor(Destination dest)
          Returns the OutQueue instance corresponding to the specific hosts.
static void shutdownAll(long timeout)
          Shuts down all statically kept OutQueue instances.
 
Methods inherited from class org.sapia.ubik.rmi.server.command.ExecQueue
remove, removeAll, shutdown, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

shutdownAll

public static void shutdownAll(long timeout)
                        throws java.lang.InterruptedException
Shuts down all statically kept OutQueue instances.

Parameters:
timeout - a shutdown timeout - in millis.
Throws:
java.lang.InterruptedException

add

public final void add(Executable cmd)
Description copied from class: ExecQueue
Adds an Executable to this queue.

Overrides:
add in class ExecQueue
Parameters:
cmd - an Executable.
See Also:
ExecQueue.add(Executable)

getQueueFor

public static final OutQueue getQueueFor(Destination dest)
Returns the OutQueue instance corresponding to the specific hosts. Response objects are indeed kept on a per-host basis, so all responses corresponding to a given host are sent at once to the latter, in the same trip - this eventually spares remote calls.

Returns:
an OutQueue for the given Destination.


Copyright © 2010 Sapia OSS. All Rights Reserved.