Class MultiExclusiveReadReceiveOperationHandler
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.MultiExclusiveReadReceiveOperationHandler
- All Implemented Interfaces:
ReceiveOperationHandler
public class MultiExclusiveReadReceiveOperationHandler
extends AbstractFifoGroupingReceiveOperationHandler
First tries and perform a
GigaSpace.readMultiple(Object, int, ReadModifiers)
using the provided template, configured maxEntries (defaults to 50) and the
configured fifoGroups (default to false). If no values are returned, will perform
a blocking read operation using GigaSpace.read(Object, long, ReadModifiers).
Read operations are performed under an exclusive read lock which mimics the similar behavior as take without actually taking the entry from the space.
- 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) First tries and perform aGigaSpace.readMultiple(Object, int, ReadModifiers)using the provided template, configured maxEntries (defaults to50) and the configured fifoGroups (default tofalse).protected ObjectdoReceiveNonBlocking(Object template, GigaSpace gigaSpace) Perform aGigaSpace.readMultiple(Object, int, ReadModifiers)using the provided template, configured maxEntries (defaults to50) and the configured fifoGroups (default tofalse).voidsetMaxEntries(int maxEntries) Sets the max entries the initial take multiple operation will perform.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
-
MultiExclusiveReadReceiveOperationHandler
public MultiExclusiveReadReceiveOperationHandler()
-
-
Method Details
-
setMaxEntries
public void setMaxEntries(int maxEntries) Sets the max entries the initial take multiple operation will perform. -
doReceiveBlocking
protected Object doReceiveBlocking(Object template, GigaSpace gigaSpace, long receiveTimeout) throws org.springframework.dao.DataAccessException First tries and perform aGigaSpace.readMultiple(Object, int, ReadModifiers)using the provided template, configured maxEntries (defaults to50) and the configured fifoGroups (default tofalse). If no values are returned, will perform a blocking read operation usingGigaSpace.read(Object, long, ReadModifiers).Read operations are performed under an exclusive read lock which mimics the similar behavior as take without actually taking the entry from the space.
- Specified by:
doReceiveBlockingin classAbstractNonBlockingReceiveOperationHandler- Throws:
org.springframework.dao.DataAccessException
-
doReceiveNonBlocking
protected Object doReceiveNonBlocking(Object template, GigaSpace gigaSpace) throws org.springframework.dao.DataAccessException Perform aGigaSpace.readMultiple(Object, int, ReadModifiers)using the provided template, configured maxEntries (defaults to50) and the configured fifoGroups (default tofalse).Read operations are performed under an exclusive read lock which mimics the similar behavior as take without actually taking the entry from the space.
- Specified by:
doReceiveNonBlockingin classAbstractNonBlockingReceiveOperationHandler- Throws:
org.springframework.dao.DataAccessException
-
toString
-