com.filenet.api.sweep

Interface CmCustomQueueSweep

  • All Superinterfaces:
    CmQueueSweep, CmSweep, EngineObject, IndependentlyPersistableObject, IndependentObject, RepositoryObject, java.io.Serializable, Subscribable


    public interface CmCustomQueueSweep
    extends RepositoryObject, CmQueueSweep
    Represents a background task that operates continuously, periodically sweeping over a queue table specified as a target class. The custom queue sweep passes retrieved queue objects to a user implementation of the SweepActionHandler interface, which performs a custom action on the objects. When the handler successfully processes a queue item, the sweep service automatically deletes the item from the queue table. Queue items that fail to process are automatically retried up to a configurable number of times.

    A queue sweep can only process subclass instances of CmAbstractQueueEntry. For a custom queue sweep to work, you must create a subclass of CmAbstractQueueEntry, and specify that subclass in the SweepTarget property of the custom queue sweep.

    To associate an implemented action handler with a custom queue sweep, you set a CmSweepAction on the custom queue sweep.

    A typical use case for a queued background operation is to control the flow of work to a scarce resource that is too slow to perform its operation within the context of an on-line transaction. A shared printer servicing a client application is one such case. An application that sends requests directly to the printer could back up the printer with requests. By implementing a custom queue sweep, you could manage the delivery of requests to the printer at an even rate. Instead of sending requests directly to the printer, the application would leverage the custom queue sweep, which would pass queue objects (printer requests) to a sweep action handler. The handler (and the supporting sweep service) would control the flow of requests to the printer.

    Metadata

    See Also:
    Custom Sweeps, Action Handlers

© Copyright IBM Corporation 2006, 2015. All rights reserved.