org.openspaces.events.polling.receive
Class MultiTakeReceiveOperationHandler
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.MultiTakeReceiveOperationHandler
- All Implemented Interfaces:
- ReceiveOperationHandler
public class MultiTakeReceiveOperationHandler
- extends AbstractFifoGroupingReceiveOperationHandler
First tries and perform a GigaSpace.takeMultiple(Object,int,int)
using
the provided template, the configured maxEntries (defaults to 50
) and the configured fifoGroups (default to false
).
If no values are returned, will perform a blocking take operation using
GigaSpace.take(Object,long,int)
.
- Author:
- kimchy
MultiTakeReceiveOperationHandler
public MultiTakeReceiveOperationHandler()
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.takeMultiple(Object,int,int)
using the provided template, the configured maxEntries (defaults to 50
) and the configured fifoGroups (default to false
).
If no values are returned, will perform a blocking take operation using
GigaSpace.take(Object,long,int)
.
- Specified by:
doReceiveBlocking
in class AbstractNonBlockingReceiveOperationHandler
- Throws:
DataAccessException
doReceiveNonBlocking
protected Object doReceiveNonBlocking(Object template,
GigaSpace gigaSpace)
throws DataAccessException
- Performs a non blocking
GigaSpace.takeMultiple(Object,int,int)
using the provided template, the configured maxEntries (defaults to 50
) and the configured fifoGroups (default to false
).
- Specified by:
doReceiveNonBlocking
in class AbstractNonBlockingReceiveOperationHandler
- Throws:
DataAccessException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © GigaSpaces.