org.apache.qpid.util.concurrent
Class BatchSynchQueueBase.SynchRefImpl

java.lang.Object
  extended by org.apache.qpid.util.concurrent.BatchSynchQueueBase.SynchRefImpl
All Implemented Interfaces:
SynchRef
Enclosing class:
BatchSynchQueueBase<E>

public class BatchSynchQueueBase.SynchRefImpl
extends Object
implements SynchRef


Field Summary
(package private)  int numRecords
          Holds the number of synch records associated with this reference.
(package private)  Collection<SynchRecord<E>> records
          Holds a reference to the collection of synch records managed by this.
 
Constructor Summary
BatchSynchQueueBase.SynchRefImpl(int n, Collection<SynchRecord<E>> records)
           
 
Method Summary
 int getNumRecords()
          Reports the number of records taken by the take or drain operation.
 void unblockProducers()
          Any producers that have had their data elements taken from the queue but have not been unblocked are unblocked when this method is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numRecords

int numRecords
Holds the number of synch records associated with this reference.


records

Collection<SynchRecord<E>> records
Holds a reference to the collection of synch records managed by this.

Constructor Detail

BatchSynchQueueBase.SynchRefImpl

public BatchSynchQueueBase.SynchRefImpl(int n,
                                        Collection<SynchRecord<E>> records)
Method Detail

getNumRecords

public int getNumRecords()
Description copied from interface: SynchRef
Reports the number of records taken by the take or drain operation.

Specified by:
getNumRecords in interface SynchRef
Returns:
The number of records taken by the take or drain operation.

unblockProducers

public void unblockProducers()
Any producers that have had their data elements taken from the queue but have not been unblocked are unblocked when this method is called. The exception to this is producers that have had their data put back onto the queue by a consumer. Producers that have had exceptions for their data items registered by consumers will be unblocked but will not return from their put call normally, but with an exception instead.

Specified by:
unblockProducers in interface SynchRef


Licensed to the Apache Software Foundation