public class BlockingQueueProxy extends AbstractQueueProxy implements BlockingQueue
Title: DataspaceFramework
Description: Implementation if BlockingQueue interface.
BlockingQueue
javadoc.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Constructor and Description |
---|
BlockingQueueProxy() |
Modifier and Type | Method and Description |
---|---|
int |
drainTo(java.util.Collection c)
If
c is instance of BlockingQueueProxy
and opened in the same accessor or belongs to the same node or any other node in sysplex
then data transfer is performed on the server side and is more efficient because data not copied to client side. |
int |
drainTo(java.util.Collection c,
int maxElements)
The same as
BlockingQueue.drainTo(Collection) but drains maximum maxElements . |
boolean |
offer(java.lang.Object o,
long timeout,
java.util.concurrent.TimeUnit unit) |
java.lang.Object |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
java.lang.Object |
pollLast(long timeout,
java.util.concurrent.TimeUnit unit)
Retrieves and removes the last added element of this queue, waiting up to the
specified wait time if necessary for an element to become available.
|
void |
put(java.lang.Object o) |
int |
remainingCapacity() |
java.lang.Object |
take() |
java.lang.Object |
takeLast()
Retrieves and removes the last added element of this queue, waiting if necessary
until an element becomes available.
|
add, addAll, addRow, addRows, clear, contains, containsAll, drainRowsTo, drainRowsTo, drainToMap, drainToQueue, drainToRowSet, drainToTable, element, elementLast, fromMap, fromQueue, fromRowSet, fromTable, isEmpty, iterator, offer, peek, peekLast, poll, pollLast, remove, remove, removeAll, removeLast, retainAll, size, toArray, toArray, toMap, toMapCollection, toQueue, toQueueCollection, toRowSet, toTableCollection
getCollectionName, getCollectionType, getMemoryModel, listTriggers
getId, setAccessor, setId
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAll, containsAll, removeAll, retainAll
addRow, addRows, drainRowsTo, drainRowsTo, drainToMap, drainToQueue, drainToRowSet, drainToTable, elementLast, fromMap, fromQueue, fromRowSet, fromTable, peekLast, pollLast, removeLast, toMap, toMapCollection, toQueue, toQueueCollection, toRowSet, toTableCollection
getCollectionName, getCollectionType, getMemoryModel, listTriggers
public boolean offer(java.lang.Object o, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offer
in interface java.util.concurrent.BlockingQueue
java.lang.InterruptedException
public java.lang.Object poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
poll
in interface java.util.concurrent.BlockingQueue
java.lang.InterruptedException
public java.lang.Object pollLast(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
BlockingQueue
timeout
- how long to wait before giving up, in units of
unit
unit
- a TimeUnit
determining how to interpret the
timeout
parameternull
if the
specified waiting time elapses before an element is availablejava.lang.InterruptedException
- if interrupted while waitingpublic java.lang.Object take() throws java.lang.InterruptedException
take
in interface java.util.concurrent.BlockingQueue
java.lang.InterruptedException
public java.lang.Object takeLast() throws java.lang.InterruptedException
BlockingQueue
java.lang.InterruptedException
- if interrupted while waitingpublic void put(java.lang.Object o) throws java.lang.InterruptedException
put
in interface java.util.concurrent.BlockingQueue
java.lang.InterruptedException
public int remainingCapacity()
remainingCapacity
in interface java.util.concurrent.BlockingQueue
public int drainTo(java.util.Collection c)
BlockingQueue
c
is instance of BlockingQueueProxy
and opened in the same accessor or belongs to the same node or any other node in sysplex
then data transfer is performed on the server side and is more efficient because data not copied to client side.
NOTE: If any exception occurred during reading from source collection or inserting into
target collection exception is throws. No rollback is done. Engine guarantees that no data will be lost,
i.e. if element is dropped from source collection then it is exists in target collection.
See BlockingQueue.drainTo(Collection)
drainTo
in interface java.util.concurrent.BlockingQueue
public int drainTo(java.util.Collection c, int maxElements)
BlockingQueue
BlockingQueue.drainTo(Collection)
but drains maximum maxElements
.
See BlockingQueue.drainTo(Collection)
drainTo
in interface java.util.concurrent.BlockingQueue
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.