org.openspaces.events.polling.receive
Class MultiReadReceiveOperationHandler
java.lang.Object
org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler
org.openspaces.events.polling.receive.MultiReadReceiveOperationHandler
- All Implemented Interfaces:
- ReceiveOperationHandler
public class MultiReadReceiveOperationHandler
- extends AbstractNonBlockingReceiveOperationHandler
First tries and perform a GigaSpace.readMultiple(Object,int)
using
the provided template and configured maxEntries (defaults to 50
). If no values
are returned, will perform a blocking read operation using
GigaSpace.read(Object,long)
.
- Author:
- kimchy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiReadReceiveOperationHandler
public MultiReadReceiveOperationHandler()
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 DataAccessException
- First tries and perform a
GigaSpace.readMultiple(Object,int)
using the provided template and configured maxEntries (defaults to 50
). If no
values are returned, will perform a blocking read operation using
GigaSpace.read(Object,long)
.
- Specified by:
doReceiveBlocking
in class AbstractNonBlockingReceiveOperationHandler
- Throws:
DataAccessException
doReceiveNonBlocking
protected Object doReceiveNonBlocking(Object template,
GigaSpace gigaSpace)
throws DataAccessException
- Perform a
GigaSpace.readMultiple(Object,int)
using the provided template and configured maxEntries (defaults to 50
). This is a non
blocking operation.
- Specified by:
doReceiveNonBlocking
in class AbstractNonBlockingReceiveOperationHandler
- Throws:
DataAccessException
Copyright © GigaSpaces.