站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 messaging API Documentation 英文版文档

PersistenceManager (JBoss Messaging API) - JBoss 3.2.7 messaging API Documentation 英文版文档


org.jboss.mq.pm.rollinglogged
Class PersistenceManager

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.mq.pm.rollinglogged.PersistenceManager
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, PersistenceManager, PersistenceManagerMBean, PersistenceManagerMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class PersistenceManager
extends org.jboss.system.ServiceMBeanSupport
implements PersistenceManager, PersistenceManagerMBean

This class manages all persistence related services.

Version:
$Revision: 1.25.2.5 $
Author:
David Maplesden (David.Maplesden@orion.co.nz), David Jencks

Field Summary
protected  ArrayList listPool
           
protected static int MAX_POOL_SIZE
           
protected  int messageCounter
           
static String TRANS_FILE_NAME
           
protected  ArrayList txPool
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Fields inherited from interface org.jboss.mq.pm.PersistenceManagerMBean
OBJECT_NAME
 
Constructor Summary
PersistenceManager()
          NewPersistenceManager constructor.
 
Method Summary
 void add(MessageReference messageRef, Tx txId)
          #Description of the Method
protected  void checkCleanup()
           
protected  void checkCleanup(SpyTxLog txLog)
           
protected  void checkRollOver()
           
 void closeQueue(JMSDestination jmsDest, SpyDestination dest)
          Close a queue
 void commitPersistentTx(Tx txId)
          #Description of the Method
 Tx createPersistentTx()
          #Description of the Method
protected  void deleteMessages(LinkedList messages)
           
 String getDataDirectory()
          Gets the DataDirectory attribute of the PersistenceManagerMBean object
 Object getInstance()
          Returns this instance.
 javax.management.ObjectName getMessageCache()
          Get the object name of the cache
 MessageCache getMessageCacheInstance()
          Get the message cache
 int getRollOverSize()
          Gets maximum number of messages until log rolls over
protected  Tx getTx(long value)
           
protected  org.jboss.mq.pm.rollinglogged.PersistenceManager.TxInfo getTxInfo(Tx txId, SpyTxLog txLog)
           
 TxManager getTxManager()
          getTxManager method comment.
protected  org.jboss.mq.pm.rollinglogged.PersistenceManager.LogInfo newQueueInfo(SpyDestination spyDest, SpyTxLog txLog)
           
protected  void releaseTx(Tx tx)
           
protected  void releaseTxInfo(org.jboss.mq.pm.rollinglogged.PersistenceManager.TxInfo list)
           
 void remove(MessageReference messageRef, Tx txId)
          #Description of the Method
 void restoreDestination(JMSDestination jmsDest)
           
 void restoreQueue(JMSDestination jmsDest, SpyDestination dest)
          Restore a queue.
 void restoreTransactions()
           
 void rollbackPersistentTx(Tx txId)
          #Description of the Method
protected  void rollOverLogs()
           
 void setDataDirectory(String newDataDirectory)
          Sets the DataDirectory attribute of the PersistenceManagerMBean object
 void setMessageCache(javax.management.ObjectName messageCache)
          Set the object name of the message cache
 void setRollOverSize(int rollOverSize)
          Sets the maximum number of messages before log rolls over
 void startService()
          Setup the data directory, where messages will be stored, connects to the message cache and restores transactions.
 void update(MessageReference messageRef, Tx txId)
          Update a message
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

TRANS_FILE_NAME

public static final String TRANS_FILE_NAME
See Also:
Constant Field Values

MAX_POOL_SIZE

protected static int MAX_POOL_SIZE

listPool

protected ArrayList listPool

txPool

protected ArrayList txPool

messageCounter

protected int messageCounter
Constructor Detail

PersistenceManager

public PersistenceManager()
                   throws javax.jms.JMSException
NewPersistenceManager constructor.

Throws:
javax.jms.JMSException - Description of Exception
Method Detail

getMessageCache

public javax.management.ObjectName getMessageCache()
Description copied from interface: PersistenceManagerMBean
Get the object name of the cache

Specified by:
getMessageCache in interface PersistenceManagerMBean
Returns:
the object name of the cache

setMessageCache

public void setMessageCache(javax.management.ObjectName messageCache)
Description copied from interface: PersistenceManagerMBean
Set the object name of the message cache

Specified by:
setMessageCache in interface PersistenceManagerMBean
Parameters:
messageCache - the object name

getMessageCacheInstance

public MessageCache getMessageCacheInstance()
Description copied from interface: PersistenceManager
Get the message cache

Specified by:
getMessageCacheInstance in interface PersistenceManager
Returns:
the instance of the message cache

setDataDirectory

public void setDataDirectory(String newDataDirectory)
Sets the DataDirectory attribute of the PersistenceManagerMBean object

Specified by:
setDataDirectory in interface PersistenceManagerMBean
Parameters:
newDataDirectory - The new DataDirectory value

getDataDirectory

public String getDataDirectory()
Gets the DataDirectory attribute of the PersistenceManagerMBean object

Specified by:
getDataDirectory in interface PersistenceManagerMBean
Returns:
The DataDirectory value

setRollOverSize

public void setRollOverSize(int rollOverSize)
Sets the maximum number of messages before log rolls over

Specified by:
setRollOverSize in interface PersistenceManagerMBean
Parameters:
rollOverSize - The maximum number of messages before rollover occurs

getRollOverSize

public int getRollOverSize()
Gets maximum number of messages until log rolls over

Specified by:
getRollOverSize in interface PersistenceManagerMBean
Returns:
number of messages before log rolls over

getInstance

public Object getInstance()
Returns this instance.

Specified by:
getInstance in interface PersistenceManagerMBean
Returns:
this

getTxManager

public TxManager getTxManager()
getTxManager method comment.

Specified by:
getTxManager in interface PersistenceManager
Returns:
The TxManager value

startService

public void startService()
                  throws Exception
Setup the data directory, where messages will be stored, connects to the message cache and restores transactions.

Throws:
Exception

add

public void add(MessageReference messageRef,
                Tx txId)
         throws javax.jms.JMSException
#Description of the Method

Specified by:
add in interface PersistenceManager
Parameters:
txId - Description of Parameter
messageRef - the message
Throws:
javax.jms.JMSException - Description of Exception

commitPersistentTx

public void commitPersistentTx(Tx txId)
                        throws javax.jms.JMSException
#Description of the Method

Specified by:
commitPersistentTx in interface PersistenceManager
Parameters:
txId - Description of Parameter
Throws:
javax.jms.JMSException - Description of Exception

createPersistentTx

public Tx createPersistentTx()
                      throws javax.jms.JMSException
#Description of the Method

Specified by:
createPersistentTx in interface PersistenceManager
Returns:
Description of the Returned Value
Throws:
javax.jms.JMSException - Description of Exception

remove

public void remove(MessageReference messageRef,
                   Tx txId)
            throws javax.jms.JMSException
#Description of the Method

Specified by:
remove in interface PersistenceManager
Parameters:
txId - Description of Parameter
messageRef - the message
Throws:
javax.jms.JMSException - Description of Exception

update

public void update(MessageReference messageRef,
                   Tx txId)
            throws javax.jms.JMSException
Update a message

Specified by:
update in interface PersistenceManager
Parameters:
txId - the transaction id
messageRef -
Throws:
javax.jms.JMSException - for any error

restoreTransactions

public void restoreTransactions()
                         throws javax.jms.JMSException
Throws:
javax.jms.JMSException

restoreDestination

public void restoreDestination(JMSDestination jmsDest)
                        throws javax.jms.JMSException
Throws:
javax.jms.JMSException

restoreQueue

public void restoreQueue(JMSDestination jmsDest,
                         SpyDestination dest)
                  throws javax.jms.JMSException
Description copied from interface: PersistenceManager
Restore a queue.

Specified by:
restoreQueue in interface PersistenceManager
Parameters:
jmsDest - the jms destination
dest - the client destination
Throws:
javax.jms.JMSException - for any error

rollbackPersistentTx

public void rollbackPersistentTx(Tx txId)
                          throws javax.jms.JMSException
#Description of the Method

Specified by:
rollbackPersistentTx in interface PersistenceManager
Parameters:
txId - Description of Parameter
Throws:
javax.jms.JMSException - Description of Exception

getTx

protected Tx getTx(long value)

getTxInfo

protected org.jboss.mq.pm.rollinglogged.PersistenceManager.TxInfo getTxInfo(Tx txId,
                                                                            SpyTxLog txLog)

releaseTxInfo

protected void releaseTxInfo(org.jboss.mq.pm.rollinglogged.PersistenceManager.TxInfo list)

deleteMessages

protected void deleteMessages(LinkedList messages)
                       throws javax.jms.JMSException
Throws:
javax.jms.JMSException

checkRollOver

protected void checkRollOver()
                      throws javax.jms.JMSException
Throws:
javax.jms.JMSException

rollOverLogs

protected void rollOverLogs()
                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

newQueueInfo

protected org.jboss.mq.pm.rollinglogged.PersistenceManager.LogInfo newQueueInfo(SpyDestination spyDest,
                                                                                SpyTxLog txLog)
                                                                         throws javax.jms.JMSException
Throws:
javax.jms.JMSException

checkCleanup

protected void checkCleanup()
                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

checkCleanup

protected void checkCleanup(SpyTxLog txLog)
                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

releaseTx

protected void releaseTx(Tx tx)

closeQueue

public void closeQueue(JMSDestination jmsDest,
                       SpyDestination dest)
                throws javax.jms.JMSException
Description copied from interface: PersistenceManager
Close a queue

Specified by:
closeQueue in interface PersistenceManager
Parameters:
jmsDest - the jms destination
dest - the client destination
Throws:
javax.jms.JMSException - for any error


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.