org.jboss.messaging.core.paging
Interface PagingManager

All Superinterfaces:
MessagingComponent
All Known Implementing Classes:
PagingManagerImpl

public interface PagingManager
extends MessagingComponent

Look at the WIKI for more information.


+------------+      1  +-------------+       N +------------+       N +-------+       1 +----------------+
| PostOffice |-------> |PagingManager|-------> |PagingStore | ------> | Page  | ------> | SequentialFile |
+------------+         +-------------+         +------------+         +-------+         +----------------+
                              |                       1 ^
                              |                         |
                              |                         |
                              |                         | 1
                              |        N +-------------------+
                              +--------> | DestinationAdress |
                                         +-------------------+   

Author:
Clebert Suconic, Tim Fox,
Method Summary
 void activate()
           
 long addSize(long size)
           
 void addTransaction(PageTransactionInfo pageTransaction)
          Point to inform/restoring Transactions used when the messages were added into paging
 long getGlobalPageSize()
           
 long getMaxMemory()
           
 PagingStore getPageStore(SimpleString address)
          To return the PageStore associated with the address
 long getTotalMemory()
           
 PageTransactionInfo getTransaction(long transactionID)
          Point to inform/restoring Transactions used when the messages were added into paging
 boolean isBackup()
           
 boolean isGlobalPageMode()
          The system is paging because of global-page-mode
 boolean isPaging(SimpleString destination)
          To be used by transactions only.
 boolean page(ServerMessage message, boolean duplicateDetection)
          Page, only if destination is in page mode.
 boolean page(ServerMessage message, long transactionId, boolean duplicateDetection)
          Page, only if destination is in page mode.
 void reloadStores()
          Reload previously created PagingStores into memory
 void removeTransaction(long transactionID)
           
 void setGlobalPageMode(boolean globalMode)
          During startup PostOffice may set GlobalPageMode as true
 void setPostOffice(PostOffice postOffice)
          An injection point for the PostOffice to inject itself
 void startGlobalDepage()
           
 void sync(java.util.Collection<SimpleString> destinationsToSync)
          Sync current-pages on disk for these destinations
 
Methods inherited from interface org.jboss.messaging.core.server.MessagingComponent
isStarted, start, stop
 

Method Detail

activate

void activate()

isBackup

boolean isBackup()

isGlobalPageMode

boolean isGlobalPageMode()
The system is paging because of global-page-mode


setGlobalPageMode

void setGlobalPageMode(boolean globalMode)
During startup PostOffice may set GlobalPageMode as true


getPageStore

PagingStore getPageStore(SimpleString address)
                         throws java.lang.Exception
To return the PageStore associated with the address

Throws:
java.lang.Exception

setPostOffice

void setPostOffice(PostOffice postOffice)
An injection point for the PostOffice to inject itself


isPaging

boolean isPaging(SimpleString destination)
                 throws java.lang.Exception
To be used by transactions only. If you're sure you will page if isPaging, just call the method page and look at its return.

Parameters:
destination -
Returns:
Throws:
java.lang.Exception

page

boolean page(ServerMessage message,
             boolean duplicateDetection)
             throws java.lang.Exception
Page, only if destination is in page mode.

Parameters:
message -
sync - - Sync should be called right after the write
Returns:
false if destination is not on page mode
Throws:
java.lang.Exception

page

boolean page(ServerMessage message,
             long transactionId,
             boolean duplicateDetection)
             throws java.lang.Exception
Page, only if destination is in page mode.

Parameters:
message -
Returns:
false if destination is not on page mode
Throws:
java.lang.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


sync

void sync(java.util.Collection<SimpleString> destinationsToSync)
          throws java.lang.Exception
Sync current-pages on disk for these destinations

Throws:
java.lang.Exception

getGlobalPageSize

long getGlobalPageSize()
Returns:

removeTransaction

void removeTransaction(long transactionID)
Parameters:
transactionID -

getMaxMemory

long getMaxMemory()
Returns:

getTotalMemory

long getTotalMemory()
Returns:

addSize

long addSize(long size)
Parameters:
size -
Returns:

startGlobalDepage

void startGlobalDepage()

reloadStores

void reloadStores()
                  throws java.lang.Exception
Reload previously created PagingStores into memory

Throws:
java.lang.Exception


Copyright © 2006 JBoss Inc. All Rights Reserved.