public class S_LibraryServiceRdbmsEventExchanger extends Object
| Modifier and Type | Field and Description | 
|---|---|
protected Connection | 
m_Connection
The SQL Connection used for events. 
 | 
protected Thread | 
m_EventExchangerThread
Synchronizes threads. 
 | 
protected Vector | 
m_EventsQueuedForTransport
Events queued for transport to other services. 
 | 
protected int | 
m_EventTransportBatchSize
The number of events that should be transported in a single batch. 
 | 
protected long | 
m_LastProcessEventsFromOtherServicesTime
The time at which processEventsFromOtherServices was last invoked. 
 | 
protected long | 
m_LastReleaseEventsQueuedForTransportTime
The time at which releaseEventsQueuedForTransport was last invoked. 
 | 
protected long | 
m_LastValidateAllConnectionsTime
The time at which the periodic call to validateConnectionPools() 
 was last invoked from tick(). 
 | 
protected LibraryConnection | 
m_LibraryConnection
The LibraryConnection used for events. 
 | 
protected long | 
m_ProcessEventsFromOtherServicesPeriod
The target time between successive processEventsFromOtherServices
 invocations, in milliseconds. 
 | 
protected long | 
m_ReleaseEventsQueuedForTransportPeriod
The target time between successive releaseEventsQueuedForTransport
 invocations, in milliseconds. 
 | 
protected S_LibraryService | 
m_Service
The owner service. 
 | 
protected Long | 
m_ServiceId
The id of the owner service. 
 | 
protected boolean | 
m_Started
Whether this S_LibraryServiceEventExchanger is started. 
 | 
protected int | 
m_StatementResetLimit
The number of events that can be released before the prepared insert
 statement is closed and re-opened. 
 | 
protected long | 
m_ValidateAllConnectionsPeriod
The period, in milliseconds, that all unallocated connections in both
 connections pools should be validated. 
 | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
S_LibraryServiceRdbmsEventExchanger()
Constructs a S_LibraryServiceRdbmsEventExchanger. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
dispose()
Shuts down this S_LibraryServiceRdbmsEventExchanger. 
 | 
void | 
flush()
Flushes any buffered outgoing or incoming events. 
 | 
void | 
forceRead()
Forces a read of any incoming events. 
 | 
void | 
init(S_LibraryService service,
    long postPeriod,
    long pollPeriod,
    int statementResetLimit,
    int eventTransportBatchSize,
    long validateAllConnectionsPeriod)
Initializes this S_LibraryServiceRdbmsEventExchanger. 
 | 
void | 
postEvent(IfsEvent event)
Posts the specified event to all other services. 
 | 
Integer | 
purgeEvents(Long thresholdAge)
Purges events older than a threshold age. 
 | 
void | 
start()
Starts this S_LibraryServiceEventExchanger. 
 | 
void | 
stop()
Stops this S_LibraryServiceEventExchanger. 
 | 
void | 
tick()
Provides a hook to perform psuedo-background processing. 
 | 
protected S_LibraryService m_Service
protected Long m_ServiceId
protected boolean m_Started
protected long m_ReleaseEventsQueuedForTransportPeriod
protected long m_LastReleaseEventsQueuedForTransportTime
protected long m_ProcessEventsFromOtherServicesPeriod
protected long m_LastProcessEventsFromOtherServicesTime
protected int m_StatementResetLimit
A value of zero indicates that the statement should never be reset.
protected int m_EventTransportBatchSize
A value of zero indicates that a defualt value should be used.
protected long m_ValidateAllConnectionsPeriod
protected long m_LastValidateAllConnectionsTime
protected LibraryConnection m_LibraryConnection
protected Connection m_Connection
protected Vector m_EventsQueuedForTransport
protected Thread m_EventExchangerThread
protected S_LibraryServiceRdbmsEventExchanger()
public final void init(S_LibraryService service, long postPeriod, long pollPeriod, int statementResetLimit, int eventTransportBatchSize, long validateAllConnectionsPeriod) throws IfsException
service - the S_LibraryServicepostPeriod - the maximum period, in milliseconds, that the
              S_LibraryServiceRdbmsEventExchanger should 
              buffer outgoing events; a value of 0 indicates
              that events should be transported immediately,
              and not buffered at allpollPeriod - the maximum period, in milliseconds, within
              which any incoming event should be processed;
              a value of 0 indicates that inter-service
              event transport is disabledstatementResetLimit - The number of events that can be released 
              before the prepared insert statement is closed 
              and re-opened.  A value of zero indicates that
              the statement should never be reset.eventTransportBatchSize - The batch size to be used for transport.
              A value of zero indicates that
              the default should be used.validateAllConnectionsPeriod - The period, in milliseconds, 
              that all unallocated connections in both connections 
              pools are validated.IfsException - (IFS-11010) if the operation failspublic final void start()
                 throws IfsException
 Until an S_LibraryServiceEventExchanger is started, any calls to
 postEvent and any events from other services are ignored.
IfsException - (IFS-11013) if the operation failspublic final void stop()
                throws IfsException
 While an S_LibraryServiceEventExchanger is stopped, any calls to
 postEvent and any events from other services are ignored.
IfsException - (IFS-11014) if the operation failspublic final void dispose()
IfsException - if the operation failspublic void postEvent(IfsEvent event) throws IfsException
event - the eventIfsException - (IFS-11011) if the operation failspublic final void tick()
                throws IfsException
See the class description.
IfsException - if the operation failspublic void flush()
           throws IfsException
IfsException - if the operation failspublic void forceRead()
               throws IfsException
IfsException - if the operation failspublic final Integer purgeEvents(Long thresholdAge) throws IfsException
See the class description.
thresholdAge - the maximum desired event age, in seconds,
            or null if unspecifiedIfsException - (IFS-11015) if the operation failsCopyright © 2025. All rights reserved.