public interface TriggerOperationHandler
If the triggerReceive(Object,org.openspaces.core.GigaSpace,long)
returns a non
null
value, it means that the receive operation should take place. If it returns a
null
value, no receive operation will be attempted.
A trigger operation handler can also control if the object returned from
triggerReceive(Object,org.openspaces.core.GigaSpace,long)
will be used as the template
for the receive operation by returning true
in isUseTriggerAsTemplate()
.
If false
is returned, the actual template configured in the polling event
container will be used.
Modifier and Type | Method and Description |
---|---|
boolean |
isUseTriggerAsTemplate()
Controls if the object returned from
triggerReceive(Object,org.openspaces.core.GigaSpace,long) will be used as the
template for the receive operation by returning true . |
Object |
triggerReceive(Object template,
GigaSpace gigaSpace,
long receiveTimeout)
Allows to perform a trigger receive operation which control if the active receive operation
will be performed in a polling event container.
|
Object triggerReceive(Object template, GigaSpace gigaSpace, long receiveTimeout) throws DataAccessException
If this operation returns a non null
value, it means that the receive
operation should take place. If it returns a null
value, no receive operation
will be attempted.
template
- The template to use for the receive operation.gigaSpace
- The GigaSpace interface to perform the receive operations withreceiveTimeout
- Receive timeout valueDataAccessException
boolean isUseTriggerAsTemplate()
triggerReceive(Object,org.openspaces.core.GigaSpace,long)
will be used as the
template for the receive operation by returning true
. If false
is returned, the actual template configured in the polling event container will be used.Copyright © GigaSpaces.