Interface PagingManager

All Superinterfaces:
ActiveMQComponent, HierarchicalRepositoryChangeListener
All Known Implementing Classes:
PagingManagerImpl

public interface PagingManager extends ActiveMQComponent, HierarchicalRepositoryChangeListener

 +--------------+      1  +----------------+       N +--------------+       N +--------+       1 +-------------------+
 | PostOffice |-------> |PagingManager|-------> |PagingStore | ------> | Page  | ------> | SequentialFile |
 +--------------+         +----------------+         +--------------+         +--------+         +-------------------+
 |                  1 ^
 |                    |
 |                    |
 |                    | 1
 |            N +----------+
 +------------> | Address |
 +----------+
 
  • Method Details

    • getPageStore

      PagingStore getPageStore(SimpleString address) throws Exception
      Returns the PageStore associated with the address; a new page store is created if necessary.
      Returns:
      the PageStore associated with the address; a new page store is created if necessary
      Throws:
      Exception
    • addTransaction

      void addTransaction(PageTransactionInfo pageTransaction)
      Point to inform/restoring Transactions used when the messages were added into paging
    • getTransaction

      PageTransactionInfo getTransaction(long transactionID)
      Point to inform/restoring Transactions used when the messages were added into paging
    • removeTransaction

      void removeTransaction(long transactionID)
    • getTransactions

      Map<Long,PageTransactionInfo> getTransactions()
    • reloadStores

      void reloadStores() throws Exception
      Reload previously created PagingStores into memory
      Throws:
      Exception
    • getStoreNames

      SimpleString[] getStoreNames()
    • deletePageStore

      void deletePageStore(SimpleString storeName) throws Exception
      Throws:
      Exception
    • processReload

      void processReload() throws Exception
      Throws:
      Exception
    • disableCleanup

      void disableCleanup()
    • resumeCleanup

      void resumeCleanup()
    • addBlockedStore

      void addBlockedStore(PagingStore store)
    • injectMonitor

      void injectMonitor(FileStoreMonitor monitor) throws Exception
      Throws:
      Exception
    • execute

      default void execute(Runnable runnable)
      Execute a runnable inside the PagingManager's executor
    • lock

      void lock()
      Lock the manager. This method should not be called during normal PagingManager usage.
    • unlock

      void unlock()
      Unlock the manager.
      See Also:
    • addSize

      PagingManager addSize(int size, boolean sizeOnly)
      Add size at the global count level. If sizeOnly = true, only the size portion is updated. If false both the counter for bytes and number of messages is updated.
    • addSize

      default PagingManager addSize(int size)
      An utility method to call addSize(size, false); this is a good fit for an IntConsumer.
    • addSizeOnly

      default PagingManager addSizeOnly(int size)
      An utility method to call addSize(size, true); this is a good fit for an IntConsumer.
    • isUsingGlobalSize

      boolean isUsingGlobalSize()
    • isGlobalFull

      boolean isGlobalFull()
    • isDiskFull

      boolean isDiskFull()
    • getDiskUsableSpace

      long getDiskUsableSpace()
    • getDiskTotalSpace

      long getDiskTotalSpace()
    • getGlobalSize

      default long getGlobalSize()
    • getGlobalMessages

      default long getGlobalMessages()
    • checkMemory

      void checkMemory(Runnable runWhenAvailable)
      Use this when you have no refernce of an address. (anonymous AMQP Producers for example)
    • counterSnapshot

      void counterSnapshot()
    • checkStorage

      default void checkStorage(Runnable runWhenAvailable)
      Use this when you have no refernce of an address. (anonymous AMQP Producers for example)
    • getMaxSize

      default long getMaxSize()
    • getMaxMessages

      default long getMaxMessages()
    • rebuildCounters

      default Future<Object> rebuildCounters(Set<Long> storedLargeMessages)
      Rebuilds all page counters for destinations that are paging in the background.
    • forEachTransaction

      default void forEachTransaction(BiConsumer<Long,PageTransactionInfo> transactionConsumer)
    • isRebuildingCounters

      default boolean isRebuildingCounters()