public class KeyValueStoreEventProcessor extends EventProcessor
| Constructor and Description |
|---|
KeyValueStoreEventProcessor() |
| Modifier and Type | Method and Description |
|---|---|
String |
getIdScript()
This method returns the script responsible for identifying
the id.
|
protected String |
getRandom()
This method generates a random string.
|
void |
init()
This method initializes the event processor.
|
Serializable |
process(String source,
Serializable event,
int retriesLeft)
This method processes the supplied event, and optionally
returns a transformed representation to be forwarded to
other processors.
|
Serializable |
process(String source,
Serializable event,
int retriesLeft,
String id)
This method processes the inbound event and stores it associated with
the supplied key (id).
|
void |
setIdScript(String script)
This method sets the script responsible for identifying
the id.
|
close, getAsynchronous, getParameters, getResultHandler, getServices, setAsynchronous, setParameters, setResultHandler, setServicespublic String getIdScript()
public void setIdScript(String script)
script - The ID scriptpublic void init()
throws Exception
init in class EventProcessorException - Failed to initializepublic Serializable process(String source, Serializable event, int retriesLeft) throws Exception
If the event cannot be processed at this time, then an exception should be thrown to initiate a retry. The number of remaining retries is supplied, to enable the processor to take appropriate error reporting action.
process in class EventProcessorsource - The source event processor name that generated the eventevent - The event to processretriesLeft - The number of retries leftException - Failed to process event, requesting retrypublic Serializable process(String source, Serializable event, int retriesLeft, String id) throws Exception
source - The sourceevent - The eventretriesLeft - The number of retrieves remainingid - The idException - Failed to store the eventprotected String getRandom()
Copyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.