Class ExclusiveReadReceiveOperationHandler
java.lang.Object
org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
org.openspaces.events.polling.receive.AbstractMemoryOnlySearchReceiveOperationHandler
org.openspaces.events.polling.receive.AbstractFifoGroupingReceiveOperationHandler
org.openspaces.events.polling.receive.ExclusiveReadReceiveOperationHandler
- All Implemented Interfaces:
ReceiveOperationHandler
public class ExclusiveReadReceiveOperationHandler
extends AbstractFifoGroupingReceiveOperationHandler
Performs single read operation using
GigaSpace.read(Object, long, ReadModifiers) 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
useFifoGroupingFields inherited from class org.openspaces.events.polling.receive.AbstractMemoryOnlySearchReceiveOperationHandler
useMemoryOnlySearchFields inherited from class org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
nonBlocking, nonBlockingFactor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectdoReceiveBlocking(Object template, GigaSpace gigaSpace, long receiveTimeout) Performs single read operation usingGigaSpace.read(Object, long, ReadModifiers)under an exclusive read lock.protected ObjectdoReceiveNonBlocking(Object template, GigaSpace gigaSpace) Performs single read operation usingGigaSpace.read(Object, long, ReadModifiers)under an exclusive read lock with no timeout.toString()Methods inherited from class org.openspaces.events.polling.receive.AbstractFifoGroupingReceiveOperationHandler
isUseFifoGrouping, setUseFifoGroupingMethods inherited from class org.openspaces.events.polling.receive.AbstractMemoryOnlySearchReceiveOperationHandler
isUseMemoryOnlySearch, setUseMemoryOnlySearchMethods inherited from class org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
receive, setNonBlocking, setNonBlockingFactor
-
Constructor Details
-
ExclusiveReadReceiveOperationHandler
public ExclusiveReadReceiveOperationHandler()
-
-
Method Details
-
doReceiveBlocking
protected Object doReceiveBlocking(Object template, GigaSpace gigaSpace, long receiveTimeout) throws org.springframework.dao.DataAccessException Performs single read operation usingGigaSpace.read(Object, long, ReadModifiers)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:
doReceiveBlockingin classAbstractNonBlockingReceiveOperationHandler- Throws:
org.springframework.dao.DataAccessException
-
doReceiveNonBlocking
protected Object doReceiveNonBlocking(Object template, GigaSpace gigaSpace) throws org.springframework.dao.DataAccessException Performs single read operation usingGigaSpace.read(Object, long, ReadModifiers)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:
doReceiveNonBlockingin classAbstractNonBlockingReceiveOperationHandler- Throws:
org.springframework.dao.DataAccessException
-
toString
-