Oracle® Application Server
XML Java API Reference
10g Release 3 (10.1.3)

B28238-01


oracle.soap.providers.sp
Class WaitQueue

java.lang.Object
  extended byoracle.soap.providers.sp.WaitQueue


public final class WaitQueue
extends java.lang.Object

A WaitQueue instance is a container of objects that can be handed out to users in a serialized manner. As long as users follow a get; use; release discipline, access to the objects in a wait queue will be thread-safe and properly serialized.

The wait queue will block threads invoking a get if no more objects are available to grant.


Constructor Summary
WaitQueue(java.lang.Object[] objs)
Create a new wait queue given an array of objects that it should manage.

Method Summary
java.lang.Object get()
Request a free object from this wait queue.
void release(java.lang.Object o)
Release a previously accquired object back to this wait queue.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WaitQueue

public WaitQueue(java.lang.Object[] objs)

Create a new wait queue given an array of objects that it should manage.

Parameters:
objs - the array of Objects managed by this wait queue.

Method Detail

get

public java.lang.Object get()

Request a free object from this wait queue.

If an object is not available, the invoking thread will block until one becomes available. No scheduling fairness is guaranteed.

Returns:
a free object from this wait queue.

release

public void release(java.lang.Object o)

Release a previously accquired object back to this wait queue.

If other threads are waiting for objects on this wait queue, one of them will be woken up to make forward progress. No scheduling fairness is guaranteed.

Parameters:
o - the object to be released into this wait queue.

Oracle® Application Server
XML Java API Reference
10g Release 3 (10.1.3)

B28238-01


Copyright © 2003, 2006, Oracle. All rights reserved.