Package org.deltafi.common.action
Class ActionEventQueue
- java.lang.Object
-
- org.deltafi.common.action.ActionEventQueue
-
public class ActionEventQueue extends java.lang.ObjectService for pushing and popping action events to a redis queue.
-
-
Constructor Summary
Constructors Constructor Description ActionEventQueue(ActionEventQueueProperties actionEventQueueProperties)ActionEventQueue(ActionEventQueueProperties actionEventQueueProperties, int actionCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrop(java.util.List<java.lang.String> actionNames)voidputActions(java.util.List<ActionInput> actionInputs)voidputResult(ActionEventInput result)Submit a result object for action processingActionInputtakeAction(java.lang.String actionClassName)Request an ActionInput object from the ActionEvent queue for the specified actionActionEventInputtakeResult()
-
-
-
Constructor Detail
-
ActionEventQueue
public ActionEventQueue(ActionEventQueueProperties actionEventQueueProperties) throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
-
ActionEventQueue
public ActionEventQueue(ActionEventQueueProperties actionEventQueueProperties, int actionCount) throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
-
-
Method Detail
-
putActions
public void putActions(java.util.List<ActionInput> actionInputs) throws redis.clients.jedis.exceptions.JedisConnectionException
- Throws:
redis.clients.jedis.exceptions.JedisConnectionException
-
takeAction
public ActionInput takeAction(java.lang.String actionClassName) throws com.fasterxml.jackson.core.JsonProcessingException, redis.clients.jedis.exceptions.JedisConnectionException
Request an ActionInput object from the ActionEvent queue for the specified action- Parameters:
actionClassName- Name of action for Action event request- Returns:
- next Action on the queue for the given action name
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the incoming event cannot be serializedredis.clients.jedis.exceptions.JedisConnectionException
-
putResult
public void putResult(ActionEventInput result) throws com.fasterxml.jackson.core.JsonProcessingException, redis.clients.jedis.exceptions.JedisConnectionException
Submit a result object for action processing- Parameters:
result- ActionEventInput object for the result to be posted to the action queue- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the outgoing event cannot be deserializedredis.clients.jedis.exceptions.JedisConnectionException
-
takeResult
public ActionEventInput takeResult() throws com.fasterxml.jackson.core.JsonProcessingException
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
drop
public void drop(java.util.List<java.lang.String> actionNames)
-
-