@Managed public abstract class NonTransient extends Event
A non-transient event is one that has a TTL != 0.
Events with a TTL > 0 have an expiration timer started. When the expiration timer fires, the event is removed from shared memory
Events with a TTL < 0 do not have an expiration timer started. These events remain in shared memory until explicitly deleted by the application.
_DEFAULT_RETRY_ON_EXCEPTION, _DEFAULT_TIME_TO_LIVE, _INVALID_TIMER_IDENTIFIER, _TIME_TO_LIVE_UNITS_DEFAULT, TIME_TO_LIVE_UNITS_DAYS, TIME_TO_LIVE_UNITS_HOURS, TIME_TO_LIVE_UNITS_MILLISECONDS, TIME_TO_LIVE_UNITS_MINUTES, TIME_TO_LIVE_UNITS_SECONDS
INVALID_TYPE_IDENTIFIER
Modifier | Constructor and Description |
---|---|
protected |
NonTransient()
Java constructor
|
protected |
NonTransient(long id)
Rule or Rule Function constructor
|
Modifier and Type | Method and Description |
---|---|
void |
assertEvent()
Assert an event.
|
void |
delete()
Delete this event.
|
protected static com.tibco.cep.runtime.model.event.EventContext |
getChannelContext(NonTransient event)
Get the channel context for an event
|
java.lang.String |
getDestination()
Get the event destination
|
protected java.lang.Boolean |
getDispatched()
Get the current dispatch state
|
PayLoad |
getPayLoad()
Get the event payload
|
java.lang.Boolean |
getRetryOnException()
Get the retry-on-exception value for this event.
|
java.lang.Long |
getTimeToLive()
Get the Time-To-Live value for this event.
|
java.lang.String |
getTimeToLiveUnits()
Get the Time-To-Live units for this event.
|
protected static void |
setChannelContext(NonTransient event,
com.tibco.cep.runtime.model.event.EventContext context)
Set the channel context for an event
|
void |
setDestination(java.lang.String destination)
Set the event destination
|
protected void |
setDispatched()
Set dispatched to true
|
protected void |
setRetryOnException(java.lang.Boolean retryOnException)
Set retry on exception
|
protected void |
setTimeToLive(java.lang.Long timeToLive)
Set the time to live for this event
|
protected void |
setTimeToLiveUnits(java.lang.String timeToLiveUnits)
Set time to live units
|
java.lang.String |
toString() |
protected void |
updatePayLoad(PayLoad payload)
Update the internal payload
|
protected void |
updateProperties()
Update event handle properties from shared memory
|
protected abstract void |
updateUserProperties(com.tibco.cep.runtime.model.event.impl.SimpleEventImpl eventImpl)
Update user properties from shared memory
|
enforceDispatchState, generate, getPayload, setPayLoad, setPayload
assertEntity, checkActive, getExtId, getHandle, getHandle, getId, load, mapArray, mapHandle, mapHandleArray, register
protected NonTransient()
protected NonTransient(long id)
id
- Unique identifierpublic final void delete()
If this event currently has a TTL expiration timer scheduled, the timer is canceled.
public final java.lang.Boolean getRetryOnException()
Event
getRetryOnException
in class Event
public final java.lang.Long getTimeToLive()
Event
getTimeToLive
in class Event
public final java.lang.String getTimeToLiveUnits()
Event
getTimeToLiveUnits
in class Event
public final void assertEvent() throws ObjectNotUniqueError, ResourceUnavailableException
Event
This method starts a new run-to-completion (RTC) cycle if one is not already active. If there is already an active RTC, this event is added to the current RTC agenda.
If this method started a new RTC cycle, it is complete when this method returns. If there is already an active RTC cycle, this event is just added to the current agenda and it will be executed at the end of the current conflict resolution cycle.
A new transaction is started if one is not already active.
RETE working memory is cleared at the end of the RTC cycle.
assertEvent
in class Event
ObjectNotUniqueError
- Duplicate external identifierResourceUnavailableException
- Rules engine not runningprotected abstract void updateUserProperties(com.tibco.cep.runtime.model.event.impl.SimpleEventImpl eventImpl)
eventImpl
- Event handle to updateprotected final void setRetryOnException(java.lang.Boolean retryOnException)
Event
setRetryOnException
in class Event
retryOnException
- Retry on exception valuepublic final PayLoad getPayLoad()
Event
getPayLoad
in class Event
public final void setDestination(java.lang.String destination)
Event
The destination cannot be changed after an event has been asserted.
Destination cannot be null.
setDestination
in class Event
destination
- Destination valuepublic final java.lang.String getDestination()
Event
getDestination
in class Event
protected final void updatePayLoad(PayLoad payload)
Event
updatePayLoad
in class Event
payload
- Payload valueprotected final void setTimeToLive(java.lang.Long timeToLive)
Event
setTimeToLive
in class Event
timeToLive
- Time to live value.protected final void setTimeToLiveUnits(java.lang.String timeToLiveUnits)
Event
setTimeToLiveUnits
in class Event
timeToLiveUnits
- Time to live unitsprotected final java.lang.Boolean getDispatched()
Event
getDispatched
in class Event
protected final void setDispatched()
Event
setDispatched
in class Event
protected final void updateProperties()
Event
updateProperties
in class Event
protected static final com.tibco.cep.runtime.model.event.EventContext getChannelContext(NonTransient event)
event
- Event eventN.B. This method is static to prevent it from being dispatched on distributed objects since it is accessing local POJOs
protected static final void setChannelContext(NonTransient event, com.tibco.cep.runtime.model.event.EventContext context)
event
- Eventcontext
- Channel context to set, may be null
N.B. This method is static to prevent it from being dispatched on distributed objects since it is accessing local POJOs