public class MultiExclusiveReadReceiveOperationHandler extends AbstractFifoGroupingReceiveOperationHandler
GigaSpace.readMultiple(Object,int,int)
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,int)
.
Read operations are performed under an exclusive read lock which mimics the similar behavior as take without actually taking the entry from the space.
useFifoGrouping
useMemoryOnlySearch
nonBlocking, nonBlockingFactor
Constructor and Description |
---|
MultiExclusiveReadReceiveOperationHandler() |
Modifier and Type | Method and Description |
---|---|
protected Object |
doReceiveBlocking(Object template,
GigaSpace gigaSpace,
long receiveTimeout)
First tries and perform a
GigaSpace.readMultiple(Object,int,int) using
the provided template, configured maxEntries (defaults to 50 ) and the configured fifoGroups (default to false ). |
protected Object |
doReceiveNonBlocking(Object template,
GigaSpace gigaSpace)
Perform a
GigaSpace.readMultiple(Object,int,int)
using the provided template, configured maxEntries (defaults to 50 ) and the configured fifoGroups (default to false ). |
void |
setMaxEntries(int maxEntries)
Sets the max entries the initial take multiple operation will perform.
|
String |
toString() |
isUseFifoGrouping, setUseFifoGrouping
isUseMemoryOnlySearch, setUseMemoryOnlySearch
receive, setNonBlocking, setNonBlockingFactor
public MultiExclusiveReadReceiveOperationHandler()
public void setMaxEntries(int maxEntries)
protected Object doReceiveBlocking(Object template, GigaSpace gigaSpace, long receiveTimeout) throws DataAccessException
GigaSpace.readMultiple(Object,int,int)
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,int)
.
Read operations are performed under an exclusive read lock which mimics the similar behavior as take without actually taking the entry from the space.
doReceiveBlocking
in class AbstractNonBlockingReceiveOperationHandler
DataAccessException
protected Object doReceiveNonBlocking(Object template, GigaSpace gigaSpace) throws DataAccessException
GigaSpace.readMultiple(Object,int,int)
using the provided template, configured maxEntries (defaults to 50
) and the configured fifoGroups (default to false
).
Read operations are performed under an exclusive read lock which mimics the similar behavior as take without actually taking the entry from the space.
doReceiveNonBlocking
in class AbstractNonBlockingReceiveOperationHandler
DataAccessException
Copyright © GigaSpaces.