org.firebirdsql.pool
Class BlockingStack

java.lang.Object
  extended by org.firebirdsql.pool.BlockingStack

Deprecated.

@Deprecated
public final class BlockingStack
extends java.lang.Object

Object stack that implements a blocking LIFO (last-in-first-out) stack. The implementation will block when the list is empty.

Author:
Steven Jardine , Mark Rotteveel

Constructor Summary
BlockingStack()
          Deprecated.  
 
Method Summary
 boolean isEmpty()
          Deprecated. Checks to see if the stack is empty.
 java.lang.Object peek()
          Deprecated. Return, but do not remove, the object at the top of the stack.
 java.lang.Object pop()
          Deprecated. Return and remove the object at the top of the stack.
 java.lang.Object pop(long msec)
          Deprecated. Return and remove the object at the top of the stack only if it is available within the specified number of milliseconds, otherwise return null.
 void push(java.lang.Object item)
          Deprecated. Push an object onto the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockingStack

public BlockingStack()
Deprecated. 
Method Detail

isEmpty

public boolean isEmpty()
Deprecated. 
Checks to see if the stack is empty.

Returns:
true if empty, false otherwise.

peek

public java.lang.Object peek()
Deprecated. 
Return, but do not remove, the object at the top of the stack.

Returns:
the object at the top of the stack, null if stack is empty.

pop

public java.lang.Object pop()
                     throws java.lang.InterruptedException
Deprecated. 
Return and remove the object at the top of the stack. If the stack is empty, wait until an object exists.

Returns:
the object at the top of the stack.
Throws:
java.lang.InterruptedException

pop

public java.lang.Object pop(long msec)
                     throws java.lang.InterruptedException
Deprecated. 
Return and remove the object at the top of the stack only if it is available within the specified number of milliseconds, otherwise return null.

Parameters:
msec - to wait for an object before returning null.
Returns:
the object at the top of the stack.
Throws:
java.lang.InterruptedException

push

public void push(java.lang.Object item)
          throws java.lang.InterruptedException
Deprecated. 
Push an object onto the stack. If the stack is unavailable, wait until it becomes available.

Parameters:
item - to be pushed onto the stack.
Throws:
java.lang.InterruptedException


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.