Class CachingPubsubPersistenceProvider

java.lang.Object
org.jivesoftware.openfire.pubsub.CachingPubsubPersistenceProvider
All Implemented Interfaces:
PubSubPersistenceProvider

public class CachingPubsubPersistenceProvider extends Object implements PubSubPersistenceProvider
A persistence provider for Pub/Sub functionality that adds caching behavior. Instead of 'writing through' to the persistence layer, the caching implementation will create batches of operations (optimizing away redundant actions). Additionally, recently accessed published data items are cached. This improves performance when processing many pub/sub operations (node modifications, item publications, etc). This provider itself does not persist data. Instead, it uses a different persistence provider as a delegate to perform these actions.
Author:
Guus der Kinderen, guus@goodbytes.nl
  • Field Details

    • DELEGATE

      public static final SystemProperty<Class> DELEGATE
      The class definition used to instantiate the delegate, used by this instance to interact with persistent data storage.
    • FLUSH_TIMER_DELAY

      public static final SystemProperty<Duration> FLUSH_TIMER_DELAY
      Flush timer delay is configurable, but not less than 20 seconds (default: 2 mins)
    • MAX_ITEMS_FLUSH

      public static final SystemProperty<Integer> MAX_ITEMS_FLUSH
      Maximum number of published items allowed in the write cache before being flushed to the database.
  • Constructor Details

    • CachingPubsubPersistenceProvider

      public CachingPubsubPersistenceProvider()
  • Method Details