Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.server
Class S_LibraryServiceRdbmsEventExchanger

    java.lang.Object
      oracle.ifs.server.S_LibraryServiceRdbmsEventExchanger

Direct Known Subclasses:
  S_LibraryServiceMostlyReadonlyEventExchanger, S_LibraryServiceReadonlyEventExchanger

    public class S_LibraryServiceRdbmsEventExchanger

extends java.lang.Object

An S_LibraryServiceRdbmsEventExchanger is a table-based implementation of S_LibraryServiceEventExchanger.

(Unpublished)

Nested Class Summary
`protected class` | `S_LibraryServiceRdbmsEventExchanger.EventDate` An inner class holds an event id and a date.
`protected class` | `S_LibraryServiceRdbmsEventExchanger.MissingEvent` A structure that represents a missing event.

Field Summary
`protected java.sql.Connection` | `m_Connection` The SQL Connection used for events.
`protected java.sql.PreparedStatement` | `m_DequeueStatement` The dequeue statement.
`protected java.sql.PreparedStatement` | `m_EnqueueStatement` The enqueue statement.
`protected java.util.Vector` | `m_EventDates` A Vector of EventDate objects, used for purging old events.
`protected java.lang.Thread` | `m_EventExchangerThread` Synchronizes threads.
`protected java.util.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 LibraryConnection` | `m_LibraryConnection` The LibraryConnection used for events.
`protected long` | `m_MaxReceivedEventId` The highest event id of all previously dequeued events.
`protected java.util.Hashtable` | `m_MissingEvents` The "missing events", as a Hashtable of MissingEvents hashed by event id.
`protected long` | `m_ProcessEventsFromOtherServicesPeriod` The target time between successive processEventsFromOtherServices invocations, in milliseconds.
`protected int` | `m_ReleasedEventCount` The number of events that have been released since the last time the prepared insert statement was opened.
`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.

Constructor Summary
`protected` | `S_LibraryServiceRdbmsEventExchanger()` Constructs a S_LibraryServiceRdbmsEventExchanger.

Method Summary
`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)` Initializes this S_LibraryServiceRdbmsEventExchanger.
`void` | `postEvent(IfsEvent event)` Posts the specified event to all other services.
`java.lang.Integer` | `purgeEvents(java.lang.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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_Service

    protected S_LibraryService m_Service

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The owner service.

  (Unpublished)

### m_ServiceId

    protected long m_ServiceId

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The id of the owner service.

  (Unpublished)

### m_Started

    protected boolean m_Started

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Whether this S_LibraryServiceEventExchanger is started.

  (Unpublished)

### m_ReleaseEventsQueuedForTransportPeriod

    protected long m_ReleaseEventsQueuedForTransportPeriod

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The target time between successive releaseEventsQueuedForTransport invocations, in milliseconds.

  (Unpublished)

### m_LastReleaseEventsQueuedForTransportTime

    protected long m_LastReleaseEventsQueuedForTransportTime

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The time at which releaseEventsQueuedForTransport was last invoked.

  (Unpublished)

### m_ProcessEventsFromOtherServicesPeriod

    protected long m_ProcessEventsFromOtherServicesPeriod

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The target time between successive processEventsFromOtherServices invocations, in milliseconds.

  (Unpublished)

### m_LastProcessEventsFromOtherServicesTime

    protected long m_LastProcessEventsFromOtherServicesTime

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The time at which processEventsFromOtherServices was last invoked.

  (Unpublished)

### m_StatementResetLimit

    protected int m_StatementResetLimit

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  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.

  (Unpublished)

### m_ReleasedEventCount

    protected int m_ReleasedEventCount

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The number of events that have been released since the last time the prepared insert statement was opened.

  Not maintained if the value of m_StatementResetLimit is zero.

  (Unpublished)

### m_EventTransportBatchSize

    protected int m_EventTransportBatchSize

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The number of events that should be transported in a single batch.

  A value of zero indicates that a defualt value should be used.

  (Unpublished)

### m_LibraryConnection

    protected LibraryConnection m_LibraryConnection

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The LibraryConnection used for events.

  (Unpublished)

### m_Connection

    protected java.sql.Connection m_Connection

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The SQL Connection used for events.

  (Unpublished)

### m_EnqueueStatement

    protected java.sql.PreparedStatement m_EnqueueStatement

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The enqueue statement.

  (Unpublished)

### m_DequeueStatement

    protected java.sql.PreparedStatement m_DequeueStatement

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The dequeue statement.

  (Unpublished)

### m_MaxReceivedEventId

    protected long m_MaxReceivedEventId

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The highest event id of all previously dequeued events.

  (Unpublished)

### m_MissingEvents

    protected java.util.Hashtable m_MissingEvents

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  The "missing events", as a Hashtable of MissingEvents hashed by event id.

  A missing event is detected by a gap in the dequeued event ids.

  (Unpublished)

### m_EventsQueuedForTransport

    protected java.util.Vector m_EventsQueuedForTransport

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Events queued for transport to other services.

  (Unpublished)

### m_EventDates

    protected java.util.Vector m_EventDates

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  A Vector of EventDate objects, used for purging old events.

  (Unpublished)

### m_EventExchangerThread

    protected java.lang.Thread m_EventExchangerThread

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Synchronizes threads.

  (Unpublished)

Constructor Detail

### S_LibraryServiceRdbmsEventExchanger

    protected S_LibraryServiceRdbmsEventExchanger()

  Constructs a S_LibraryServiceRdbmsEventExchanger.

  (Unpublished)

Method Detail

### init

    public final void init(S_LibraryService service,
                           long postPeriod,
                           long pollPeriod,
                           int statementResetLimit,
                           int eventTransportBatchSize)
                    throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Initializes this S_LibraryServiceRdbmsEventExchanger.

  Parameters:
    `service` - the S_LibraryService
    `postPeriod` - 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 all
    `pollPeriod` - the maximum period, in milliseconds, within which any incoming event should be processed; a value of 0 indicates that inter-service event transport is disabled
    `statementResetLimit` - 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.
  Throws:
    `IfsException` - (IFS-11010) if the operation fails
  (Unpublished)

### start

    public final void start()
                     throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Starts this S_LibraryServiceEventExchanger.

  Until an S_LibraryServiceEventExchanger is started, any calls to `postEvent` and any events from other services are ignored.

  Throws:
    `IfsException` - (IFS-11013) if the operation fails
  (Unpublished)

### stop

    public final void stop()
                    throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Stops this S_LibraryServiceEventExchanger.

  While an S_LibraryServiceEventExchanger is stopped, any calls to `postEvent` and any events from other services are ignored.

  Throws:
    `IfsException` - (IFS-11014) if the operation fails
  (Unpublished)

### dispose

    public final void dispose()

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Shuts down this S_LibraryServiceRdbmsEventExchanger.

  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### postEvent

    public void postEvent(IfsEvent event)
                   throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Posts the specified event to all other services.

  Parameters:
    `event` - the event
  Throws:
    `IfsException` - (IFS-11011) if the operation fails
  (Unpublished)

### tick

    public final void tick()
                    throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Provides a hook to perform psuedo-background processing.

  See the class description.

  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### flush

    public void flush()
               throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Flushes any buffered outgoing or incoming events.

  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### forceRead

    public void forceRead()
                   throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Forces a read of any incoming events.

  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### purgeEvents

    public final java.lang.Integer purgeEvents(java.lang.Long thresholdAge)
                                        throws IfsException

  Description copied from class: `S_LibraryServiceRdbmsEventExchanger`
  Purges events older than a threshold age.

  See the class description.

  Parameters:
    `thresholdAge` - the maximum desired event age, in seconds, or null if unspecified
  Returns:
    the number of events purged, or null if unknown
  Throws:
    `IfsException` - (IFS-11015) if the operation fails
  (Unpublished)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD