public class DispatchedEvent extends TieSimpleObject
Modifier and Type | Class and Description |
---|---|
static class |
DispatchedEvent.StatusCode
Enumeration for the various status codes.
|
Modifier and Type | Field and Description |
---|---|
static String |
AUDITEVENT_PROPERTYNAME_ESTIMATEDCOST
The AuditEvent property key for estimated cost of processing
an AuditEvent that will be dispatched to Workers.
|
static String |
CLASS_NAME
The name of the ClassObject representing this class.
|
static String |
CONFIRMEDCOST_ATTRIBUTE
The name of the Attribute representing
the confirmed cost (relative to 1) of processing this event,
set by the Worker.
|
static String |
CREATEDATE_ATTRIBUTE
The name of the Attribute representing
The date this DispatchedEvent was created.
|
static String |
DISPATCHINGAUDITSPECIFICATION_ATTRIBUTE
The name of the Attribute representing
the dispatcher's AuditSpecification.
|
static String |
DISPATCHINGHANDLERSPECIFICATION_ATTRIBUTE
The name of the Attribute representing
the DispatchingHandlerSpecification used to dispatch the event.
|
static String |
ESTIMATEDCOST_ATTRIBUTE
The name of the Attribute representing
the estimated cost (relative to 1) of processing this event,
set by the dispatcher.
|
static String |
EVENTID_ATTRIBUTE
The name of the Attribute representing
The AuditEvent ID.
|
static String |
EVENTSETNAME_ATTRIBUTE
The name of the Attribute representing
the name of the Event Set that this event is a member of.
|
static String |
SETTING_DEPENDENT_DISPATCHEDEVENT_ID
DispatchedEvent setting that holds the dependent DispatchedEvent ID
of the event.
|
static String |
SETTING_EFFECTIVE_TARGETOBJECT
DispatchedEvent setting that holds the effective target object
of the event.
|
static String |
SETTING_RETRY_ON_FAILURE_PHASE
DispatchedEvent setting that holds the RetryOnFailure rety phase number.
|
static String |
SETTING_RETRY_ON_FAILURE_TIME
DispatchedEvent setting that holds the time (in milliseconds since 1970)
when the next retry phase should be attempted.
|
static String |
SETTINGS_ATTRIBUTE
The name of the Attribute representing
the settings that can be used for custom communication
between the dispatcher and a Worker.
|
static String |
STATUSCODE_ATTRIBUTE
The name of the Attribute representing
The code that identifies the status of the DispatchedEvent.
|
static int |
STATUSCODE_NUMBER_CREATED
The DispatchedEvent status code indicating that the event
associated with the object has been created but not yet dispatched.
|
static int |
STATUSCODE_NUMBER_DISPATCHED
The DispatchedEvent status code indicating that the event
associated with the object has been dispatched,
but processing has not yet begun.
|
static int |
STATUSCODE_NUMBER_PROCESSING_COMPLETED
The DispatchedEvent status code indicating that the event
associated with the object has been dispatched,
and that processing has been completed.
|
static int |
STATUSCODE_NUMBER_PROCESSING_STARTED
The DispatchedEvent status code indicating that the event
associated with the object has been dispatched,
and that processing has started.
|
static int |
STATUSCODE_NUMBER_REQUEUED
The DispatchedEvent status code indicating that the event
associated with the object has been requeued manually by the Worker
back to the dispatcher.
|
static String |
UUID_ATTRIBUTE
The name of the Attribute representing the UUID.
|
static String |
WORKINGAUDITSPECIFICATION_ATTRIBUTE
The name of the Attribute representing
the Worker's AuditSpecification.
|
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session, NAME_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
DispatchedEvent(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a DispatchedEvent object.
|
Modifier and Type | Method and Description |
---|---|
void |
addSetting(String key,
AttributeValue value)
Adds a setting (SimpleProperty) for this object.
|
static DispatchedEvent |
create(AuditEvent event,
DispatchingHandlerSpecification dhSpec,
AuditSpecification dispatcher,
AuditSpecification worker,
String eventSetName,
Integer estCost)
Creates an new DispatchedEvent for the specified event.
|
static DispatchedEvent[] |
findAllByDispatcher(AuditSpecification spec)
Returns all DispatchedEvents for a dispatcher.
|
static DispatchedEvent[] |
findAllByDispatchingHandlerSpecification(DispatchingHandlerSpecification spec)
Returns all DispatchedEvents for DispatchingHandlerSpecification.
|
static DispatchedEvent[] |
findAllByWorker(AuditSpecification spec)
Returns all DispatchedEvents for a Worker.
|
static DispatchedEvent |
findByEventId(LibrarySession session,
long eventId)
Returns the DispatchedEvent for the specified event ID.
|
Integer |
getConfirmedCost()
Gets the confirmed cost (relative to 1) of processing this event,
set by the Worker, or null if undefined.
|
int |
getCost()
Gets the cost, retuning either the confirmed cost (if available)
or the estimated cost.
|
Long |
getDependentDispatchedEventId()
Gets the ID of the DE that this instance is dependent upon,
due to a previous failure of the dependent DE.
|
AuditSpecification |
getDispatchingAuditSpecification()
Returns the dispatcher's AuditSpecification.
|
DispatchingHandlerSpecification |
getDispatchingHandlerSpecification()
Returns the DispatchingHandlerSpecification used to dispatch the event.
|
Long |
getEffectiveTargetObjectId()
Gets the effective target object Id.
|
int |
getEstimatedCost()
Gets the estimated cost (relative to 1) of processing this event,
set by the dispatcher.
|
Long |
getEventId()
Gets The ID of the encapsulated AuditEvent.
|
String |
getEventSetName()
Gets the name of the Event Set that this event is a member of.
|
Date |
getRequestDate()
Gets the date this DispatchedEvent was created.
|
int |
getRetryPhase()
Gets the "RetryOnFailure" retry phase.
|
Long |
getRetryTime()
Gets the "RetryOnFailure" retry time.
|
AttributeValue |
getSetting(String key)
Gets the setting that can be used for custom communication
between the dispatcher and a Worker.
|
SimpleProperty[] |
getSettings()
Gets the settings that can be used for custom communication
between the dispatcher and a Worker.
|
DispatchedEvent.StatusCode |
getStatusCode()
Gets the status code enum.
|
String |
getStatusCodeName()
Gets the status code name.
|
int |
getStatusCodeNumber()
Gets the status code number.
|
String |
getUuid()
Gets the value of the UUID attribute.
|
AuditSpecification |
getWorkingAuditSpecification()
Returns the Worker's AuditSpecification.
|
static String |
lookupStatusCodeName(int codeNum)
Get the Status code name that corresponds to the specified
Status code number.
|
static Integer |
lookupStatusCodeNumber(String codeName)
Get the Status code number that corresponds to the specified
Status code name.
|
void |
removeDependentDispatchedEventId()
Removes the "dependent DispatchedEvent ID" setting.
|
void |
removeRetryTime()
Removes the "RetryOnFailure" retry time.
|
void |
removeSetting(String key)
Removes a setting (SimpleProperty) for this object.
|
void |
requeueToDispatcher(AuditEvent event)
Requeue the specified event back to the dispatcher.
|
void |
requeueToDispatcher(AuditEvent event,
DispatchedEvent.StatusCode status)
Requeue the specified event back to the dispatcher.
|
void |
setCreated()
Set the StatusCode to "Created".
|
void |
setDependentDispatchedEventId(Long dependentId)
Sets the ID of the DE that this instance is dependent upon,
due to a previous failure of the dependent DE.
|
void |
setDispatched()
Set the StatusCode to "Dispatched".
|
void |
setEffectiveTargetObjectId(Long targetId)
Sets the effective target object Id.
|
void |
setProcessingCompleted()
Set the StatusCode to "Processing Completed".
|
void |
setProcessingStarted()
Set the StatusCode to "Processing Started".
|
void |
setRetryPhase(int retryPhase)
Sets the "RetryOnFailure" retry phase.
|
void |
setRetryTime(long retryTime)
Sets the "RetryOnFailure" retry time.
|
void |
setStatusCode(DispatchedEvent.StatusCode sc)
Sets a new extraction state.
|
void |
setStatusCode(int scNum)
Sets a new status code.
|
void |
update(AuditSpecification worker,
String eventSetName,
Integer estCost)
Updates a DispatchedEvent.
|
free, handleCreate, isValidEventType
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, auditUpdated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, hasNameAttribute, hasPropertyBundleAttribute, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postCreate, postEvent, postEvent, postFree, postUpdate, preCreate, preFree, prePostAuditEvent, preUpdate, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String UUID_ATTRIBUTE
public static final String EVENTID_ATTRIBUTE
public static final String STATUSCODE_ATTRIBUTE
public static final String CREATEDATE_ATTRIBUTE
public static final String DISPATCHINGHANDLERSPECIFICATION_ATTRIBUTE
public static final String DISPATCHINGAUDITSPECIFICATION_ATTRIBUTE
public static final String WORKINGAUDITSPECIFICATION_ATTRIBUTE
public static final String ESTIMATEDCOST_ATTRIBUTE
public static final String CONFIRMEDCOST_ATTRIBUTE
public static final String EVENTSETNAME_ATTRIBUTE
public static final String SETTINGS_ATTRIBUTE
public static final int STATUSCODE_NUMBER_CREATED
public static final int STATUSCODE_NUMBER_DISPATCHED
public static final int STATUSCODE_NUMBER_PROCESSING_STARTED
public static final int STATUSCODE_NUMBER_PROCESSING_COMPLETED
public static final int STATUSCODE_NUMBER_REQUEUED
public static final String SETTING_EFFECTIVE_TARGETOBJECT
public static final String SETTING_RETRY_ON_FAILURE_PHASE
public static final String SETTING_RETRY_ON_FAILURE_TIME
public static final String SETTING_DEPENDENT_DISPATCHEDEVENT_ID
public static final String AUDITEVENT_PROPERTYNAME_ESTIMATEDCOST
protected DispatchedEvent(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessionid
- object idclassId
- class iddata
- data componentIfsException
- if the operation failspublic String getUuid() throws IfsException
IfsException
- if the operation failspublic Long getEventId() throws IfsException
IfsException
- if the operation failspublic int getStatusCodeNumber() throws IfsException
IfsException
- if the operation failspublic DispatchedEvent.StatusCode getStatusCode() throws IfsException
IfsException
- if the operation failspublic String getStatusCodeName() throws IfsException
IfsException
- if the operation failspublic static Integer lookupStatusCodeNumber(String codeName) throws IfsException
codeName
- the Status code nameIfsException
- if the operation failspublic static String lookupStatusCodeName(int codeNum) throws IfsException
codeNum
- the Status code numberIfsException
- if the operation failspublic Date getRequestDate() throws IfsException
IfsException
- if the operation failspublic DispatchingHandlerSpecification getDispatchingHandlerSpecification() throws IfsException
IfsException
- if operation failspublic AuditSpecification getDispatchingAuditSpecification() throws IfsException
IfsException
- if operation failspublic AuditSpecification getWorkingAuditSpecification() throws IfsException
IfsException
- if operation failspublic int getEstimatedCost() throws IfsException
IfsException
- if the operation failspublic Integer getConfirmedCost() throws IfsException
IfsException
- if the operation failspublic int getCost() throws IfsException
IfsException
- if the operation failspublic String getEventSetName() throws IfsException
IfsException
- if the operation failspublic SimpleProperty[] getSettings() throws IfsException
IfsException
- if the operation failspublic AttributeValue getSetting(String key) throws IfsException
key
- the keyIfsException
- if the operation failspublic Long getEffectiveTargetObjectId() throws IfsException
Returns null if setting is not set.
IfsException
- if the operation failspublic int getRetryPhase() throws IfsException
Returns 0 if setting is not set.
IfsException
- if the operation failspublic Long getRetryTime() throws IfsException
Returns null if setting is not set.
IfsException
- if the operation failspublic Long getDependentDispatchedEventId() throws IfsException
Returns null if setting is not set.
IfsException
- if the operation failspublic void setEffectiveTargetObjectId(Long targetId) throws IfsException
targetId
- the effective target object IdIfsException
- if the operation failspublic void setRetryPhase(int retryPhase) throws IfsException
retryPhase
- the retry phaseIfsException
- if the operation failspublic void setRetryTime(long retryTime) throws IfsException
retryTime
- the retry time (millis since 1970)IfsException
- if the operation failspublic void setDependentDispatchedEventId(Long dependentId) throws IfsException
dependentId
- the dependent DE IdIfsException
- if the operation failspublic void removeRetryTime() throws IfsException
IfsException
- if the operation failspublic void removeDependentDispatchedEventId() throws IfsException
IfsException
- if the operation failspublic void addSetting(String key, AttributeValue value) throws IfsException
key
- the setting property's keyvalue
- the setting property's valueIfsException
- if the operation failspublic void removeSetting(String key) throws IfsException
key
- the setting property's keyIfsException
- if the operation failspublic void setStatusCode(int scNum) throws IfsException
scNum
- the new StatusCode numberIfsException
- if operation failspublic void setStatusCode(DispatchedEvent.StatusCode sc) throws IfsException
sc
- the new StatusCodeIfsException
- if operation failspublic void setCreated() throws IfsException
IfsException
- if operation failspublic void setDispatched() throws IfsException
IfsException
- if operation failspublic void setProcessingStarted() throws IfsException
IfsException
- if operation failspublic void setProcessingCompleted() throws IfsException
IfsException
- if operation failspublic void requeueToDispatcher(AuditEvent event) throws IfsException
Sets the StatusCode to STATUSCODE_REQUEUED.
event
- the AuditEvent to requeueIfsException
- if operation failspublic void requeueToDispatcher(AuditEvent event, DispatchedEvent.StatusCode status) throws IfsException
event
- the AuditEvent to requeuestatus
- the Status code this event is updated toIfsException
- if operation failspublic static DispatchedEvent create(AuditEvent event, DispatchingHandlerSpecification dhSpec, AuditSpecification dispatcher, AuditSpecification worker, String eventSetName, Integer estCost) throws IfsException
event
- The event that is being dispatcheddhSpec
- The DispatchingHandlerSpecificationdispatcher
- The dispatcherworker
- The Worker to dispatch toeventSetName
- The Event Set name, or null if event is not in a setestCost
- The estimated cost to process event (relative to 1)IfsException
- if the operation failspublic void update(AuditSpecification worker, String eventSetName, Integer estCost) throws IfsException
This happens when an event gets requeued back to the dispatcher, who then re-dispatches to another Worker. It is also called during a rebalance operation to queue events back to the dispatcher.
worker
- The Worker to dispatch toeventSetName
- The Event Set name (if null, do not update)estCost
- The estimated cost (if null, do not update)IfsException
- if the operation failspublic static DispatchedEvent[] findAllByDispatchingHandlerSpecification(DispatchingHandlerSpecification spec) throws IfsException
The instances will be sorted by ID.
spec
- the DispatchingHandlerSpecificationIfsException
- if the operation fails.public static DispatchedEvent[] findAllByDispatcher(AuditSpecification spec) throws IfsException
The instances will be sorted by ID.
spec
- the AuditSpecification for the dispatcherIfsException
- if the operation fails.public static DispatchedEvent[] findAllByWorker(AuditSpecification spec) throws IfsException
The instances will be sorted by ID.
spec
- the AuditSpecification for the WorkerIfsException
- if the operation fails.public static DispatchedEvent findByEventId(LibrarySession session, long eventId) throws IfsException
session
- the session contexteventId
- the event IDIfsException
- if the operation fails.Copyright © 2025. All rights reserved.