GigaSpaces XAP 9.7.2 API

org.openspaces.events.polling.receive
Class ExclusiveReadReceiveOperationHandler

java.lang.Object
  extended by org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
      extended by org.openspaces.events.polling.receive.AbstractMemoryOnlySearchReceiveOperationHandler
          extended by org.openspaces.events.polling.receive.AbstractFifoGroupingReceiveOperationHandler
              extended by org.openspaces.events.polling.receive.ExclusiveReadReceiveOperationHandler
All Implemented Interfaces:
ReceiveOperationHandler

public class ExclusiveReadReceiveOperationHandler
extends AbstractFifoGroupingReceiveOperationHandler

Performs single read operation using GigaSpace.read(Object,long,int) under an exclusive read lock. This receive operation handler allows to lock entries so other receive operations won't be able to obtain it (mimics the take operation) but without actually performing a take from the Space. Note, this receive operation handler must be performed under a transaction.

Author:
kimchy

Field Summary
 
Fields inherited from class org.openspaces.events.polling.receive.AbstractFifoGroupingReceiveOperationHandler
useFifoGrouping
 
Fields inherited from class org.openspaces.events.polling.receive.AbstractMemoryOnlySearchReceiveOperationHandler
useMemoryOnlySearch
 
Fields inherited from class org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
nonBlocking, nonBlockingFactor
 
Constructor Summary
ExclusiveReadReceiveOperationHandler()
           
 
Method Summary
protected  Object doReceiveBlocking(Object template, GigaSpace gigaSpace, long receiveTimeout)
          Performs single read operation using GigaSpace.read(Object,long,int) under an exclusive read lock.
protected  Object doReceiveNonBlocking(Object template, GigaSpace gigaSpace)
          Performs single read operation using GigaSpace.read(Object,long,int) under an exclusive read lock with no timeout.
 String toString()
           
 
Methods inherited from class org.openspaces.events.polling.receive.AbstractFifoGroupingReceiveOperationHandler
isUseFifoGrouping, setUseFifoGrouping
 
Methods inherited from class org.openspaces.events.polling.receive.AbstractMemoryOnlySearchReceiveOperationHandler
isUseMemoryOnlySearch, setUseMemoryOnlySearch
 
Methods inherited from class org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
receive, setNonBlocking, setNonBlockingFactor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExclusiveReadReceiveOperationHandler

public ExclusiveReadReceiveOperationHandler()
Method Detail

doReceiveBlocking

protected Object doReceiveBlocking(Object template,
                                   GigaSpace gigaSpace,
                                   long receiveTimeout)
                            throws DataAccessException
Performs single read operation using GigaSpace.read(Object,long,int) under an exclusive read lock. This receive operation handler allows to lock entries so other receive operations won't be able to obtain it (mimics the take operation) but without actually performing a take from the Space. Note, this receive operation handler must be performed under a transaction.

Specified by:
doReceiveBlocking in class AbstractNonBlockingReceiveOperationHandler
Throws:
DataAccessException

doReceiveNonBlocking

protected Object doReceiveNonBlocking(Object template,
                                      GigaSpace gigaSpace)
                               throws DataAccessException
Performs single read operation using GigaSpace.read(Object,long,int) under an exclusive read lock with no timeout. This receive operation handler allows to lock entries so other receive operations won't be able to obtain it (mimics the take operation) but without actually performing a take from the Space. Note, this receive operation handler must be performed under a transaction.

Specified by:
doReceiveNonBlocking in class AbstractNonBlockingReceiveOperationHandler
Throws:
DataAccessException

toString

public String toString()
Overrides:
toString in class Object

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.