|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.mq.pm.file.PersistenceManager
This class manages all persistence related services for file based persistence.
| Field Summary | |
protected static int |
MAX_POOL_SIZE
|
protected long |
tidcounter
|
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()
Sets up the transaction manager. |
|
| Method Summary | |
void |
add(MessageReference messageRef,
Tx txId)
#Description of the Method |
void |
closeQueue(JMSDestination jmsDest,
SpyDestination dest)
Close a queue |
void |
commitPersistentTx(Tx txId)
#Description of the Method |
Tx |
createPersistentTx()
#Description of the Method |
protected File |
createTxFile(Tx txId)
|
protected void |
deleteTxFile(File file)
|
static String |
encodeFileName(String name)
Used to encode any string into a string that is safe to use as a file name on most operating systems. |
String |
getDataDirectory()
Gets the DataDirectory attribute of the PersistenceManager object |
Object |
getInstance()
Get the persistence manager instance |
javax.management.ObjectName |
getMessageCache()
Get the object name of the cache |
MessageCache |
getMessageCacheInstance()
Get the message cache |
protected org.jboss.mq.pm.file.PersistenceManager.TxInfo |
getTxInfo(File f)
|
TxManager |
getTxManager()
Gets the TxManager attribute of the PersistenceManager object |
void |
initQueue(SpyDestination dest)
|
protected ArrayList |
readTxFile(File file)
|
protected void |
releaseTxInfo(org.jboss.mq.pm.file.PersistenceManager.TxInfo info)
|
void |
remove(MessageReference messageRef,
Tx txId)
#Description of the Method |
void |
restoreDestination(JMSDestination jmsDest)
The restoreDestination method is called by a queue or
topic on startup. |
void |
restoreQueue(JMSDestination jmsDest,
SpyDestination dest)
The restoreQueue method restores the messages for
a SpyDestination to its queue by sending them to the associated
JMSDestination. |
void |
rollbackPersistentTx(Tx txId)
#Description of the Method |
void |
setDataDirectory(String newDataDirectory)
Sets the DataDirectory attribute of the PersistenceManager object |
void |
setMessageCache(javax.management.ObjectName messageCache)
Set the object name of the message cache |
void |
startService()
Setup the data directory, where messages will be stored, connects to the message cache and restores transactions. |
protected boolean |
testRollBackTx(Long tx,
ArrayList removingMessages)
|
void |
update(MessageReference messageRef,
Tx txId)
#Description of the Method |
| 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 |
protected static final int MAX_POOL_SIZE
protected ArrayList txPool
protected long tidcounter
| Constructor Detail |
public PersistenceManager()
throws javax.jms.JMSException
| Method Detail |
public Object getInstance()
PersistenceManagerMBean
getInstance in interface PersistenceManagerMBeanpublic javax.management.ObjectName getMessageCache()
PersistenceManagerMBean
getMessageCache in interface PersistenceManagerMBeanpublic void setMessageCache(javax.management.ObjectName messageCache)
PersistenceManagerMBean
setMessageCache in interface PersistenceManagerMBeanmessageCache - the object namepublic MessageCache getMessageCacheInstance()
PersistenceManager
getMessageCacheInstance in interface PersistenceManagerpublic void setDataDirectory(String newDataDirectory)
setDataDirectory in interface PersistenceManagerMBeannewDataDirectory - The new DataDirectory valuepublic String getDataDirectory()
getDataDirectory in interface PersistenceManagerMBeanpublic TxManager getTxManager()
getTxManager in interface PersistenceManager
public void startService()
throws Exception
Exception
public void restoreDestination(JMSDestination jmsDest)
throws javax.jms.JMSException
restoreDestination method is called by a queue or
topic on startup. The method sends all the pre-restored messages to
the JMSDestination to get them back into the in-memory queue.
jmsDest - a JMSDestination value
javax.jms.JMSException - if an error occurs
public void restoreQueue(JMSDestination jmsDest,
SpyDestination dest)
throws javax.jms.JMSException
restoreQueue method restores the messages for
a SpyDestination to its queue by sending them to the associated
JMSDestination.
restoreQueue in interface PersistenceManagerjmsDest - a JMSDestination valuedest - a SpyDestination value
javax.jms.JMSException - if an error occurs
public void initQueue(SpyDestination dest)
throws javax.jms.JMSException
javax.jms.JMSException
public void add(MessageReference messageRef,
Tx txId)
throws javax.jms.JMSException
add in interface PersistenceManagertxId - Description of ParametermessageRef - the message
javax.jms.JMSException - Description of Exception
public void commitPersistentTx(Tx txId)
throws javax.jms.JMSException
commitPersistentTx in interface PersistenceManagertxId - Description of Parameter
javax.jms.JMSException - Description of Exception
public Tx createPersistentTx()
throws javax.jms.JMSException
createPersistentTx in interface PersistenceManagerjavax.jms.JMSException - Description of Exception
public void remove(MessageReference messageRef,
Tx txId)
throws javax.jms.JMSException
remove in interface PersistenceManagertxId - Description of ParametermessageRef - the message
javax.jms.JMSException - Description of Exception
public void update(MessageReference messageRef,
Tx txId)
throws javax.jms.JMSException
update in interface PersistenceManagertxId - Description of ParametermessageRef -
javax.jms.JMSException - Description of Exception
public void rollbackPersistentTx(Tx txId)
throws javax.jms.JMSException
rollbackPersistentTx in interface PersistenceManagertxId - Description of Parameter
javax.jms.JMSException - Description of Exception
protected org.jboss.mq.pm.file.PersistenceManager.TxInfo getTxInfo(File f)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected void releaseTxInfo(org.jboss.mq.pm.file.PersistenceManager.TxInfo info)
protected boolean testRollBackTx(Long tx,
ArrayList removingMessages)
throws IOException
IOException
protected void deleteTxFile(File file)
throws javax.jms.JMSException
javax.jms.JMSException
protected ArrayList readTxFile(File file)
throws javax.jms.JMSException
javax.jms.JMSException
protected File createTxFile(Tx txId)
throws javax.jms.JMSException
javax.jms.JMSException
public void closeQueue(JMSDestination jmsDest,
SpyDestination dest)
throws javax.jms.JMSException
PersistenceManager
closeQueue in interface PersistenceManagerjmsDest - the jms destinationdest - the client destination
javax.jms.JMSException - for any errorpublic static String encodeFileName(String name)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||