Class ReadTriggerOperationHandler
java.lang.Object
org.openspaces.events.polling.trigger.ReadTriggerOperationHandler
- All Implemented Interfaces:
TriggerOperationHandler
A trigger operation handler that performs read based on the provided template and returns its
result.
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanControls if the object returned fromTriggerOperationHandler.triggerReceive(Object, org.openspaces.core.GigaSpace, long)will be used as the template for the receive operation by returningtrue.voidsetUseTriggerAsTemplate(boolean useTriggerAsTemplate) Controls if the object returned fromtriggerReceive(Object, org.openspaces.core.GigaSpace, long)will be used as the template for the receive operation by returningtrue.toString()triggerReceive(Object template, GigaSpace gigaSpace, long receiveTimeout) UsesGigaSpace.read(Object, long)and returns its result.
-
Constructor Details
-
ReadTriggerOperationHandler
public ReadTriggerOperationHandler()
-
-
Method Details
-
setUseTriggerAsTemplate
public void setUseTriggerAsTemplate(boolean useTriggerAsTemplate) Controls if the object returned fromtriggerReceive(Object, org.openspaces.core.GigaSpace, long)will be used as the template for the receive operation by returningtrue. Iffalseis returned, the actual template configured in the polling event container will be used. -
isUseTriggerAsTemplate
public boolean isUseTriggerAsTemplate()Description copied from interface:TriggerOperationHandlerControls if the object returned fromTriggerOperationHandler.triggerReceive(Object, org.openspaces.core.GigaSpace, long)will be used as the template for the receive operation by returningtrue. Iffalseis returned, the actual template configured in the polling event container will be used.- Specified by:
isUseTriggerAsTemplatein interfaceTriggerOperationHandler- See Also:
-
triggerReceive
public Object triggerReceive(Object template, GigaSpace gigaSpace, long receiveTimeout) throws org.springframework.dao.DataAccessException UsesGigaSpace.read(Object, long)and returns its result.- Specified by:
triggerReceivein interfaceTriggerOperationHandler- Parameters:
template- The template to use for the receive operation.gigaSpace- The GigaSpace interface to perform the receive operations withreceiveTimeout- Receive timeout value- Throws:
org.springframework.dao.DataAccessException
-
toString
-