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

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


org.jboss.mq.pm.file
Class CacheStore

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

public class CacheStore
extends org.jboss.system.ServiceMBeanSupport
implements CacheStore, CacheStoreMBean

This class manages the persistence needs of the MessageCache

Version:
$Revision: 1.8.2.1 $
Author:
Hiram Chirino

Field Summary
 
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
 
Constructor Summary
CacheStore()
           
 
Method Summary
 String getDataDirectory()
          Gets the DataDirectory attribute of the CacheStoreMBean object
 Object getInstance()
          Get the instance
 SpyMessage loadFromStorage(MessageReference mh)
          Reads the message refered to by the MessagReference back as a SpyMessage
 void removeFromStorage(MessageReference mh)
          Removes the message that was stored in secondary storage.
 void saveToStorage(MessageReference mh, SpyMessage message)
          Stores the given message to secondary storeage.
 void setDataDirectory(String newDataDirectory)
          Sets the DataDirectory attribute of the CacheStoreMBean object
protected  void startService()
          This gets called to start the service.
 
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
 

Constructor Detail

CacheStore

public CacheStore()
Method Detail

loadFromStorage

public SpyMessage loadFromStorage(MessageReference mh)
                           throws javax.jms.JMSException
Description copied from interface: CacheStore
Reads the message refered to by the MessagReference back as a SpyMessage

Specified by:
loadFromStorage in interface CacheStore
Parameters:
mh - the message reference
Returns:
the message
Throws:
javax.jms.JMSException - for any error
See Also:
loadFromStorage(MessageReference)

saveToStorage

public void saveToStorage(MessageReference mh,
                          SpyMessage message)
                   throws javax.jms.JMSException
Description copied from interface: CacheStore
Stores the given message to secondary storeage. You should be able to use the MessagReference to load the message back later.

Specified by:
saveToStorage in interface CacheStore
Parameters:
mh - the message reference
message - the message
Throws:
javax.jms.JMSException - for any error
See Also:
saveToStorage(MessageReference, SpyMessage)

removeFromStorage

public void removeFromStorage(MessageReference mh)
                       throws javax.jms.JMSException
Description copied from interface: CacheStore
Removes the message that was stored in secondary storage.

Specified by:
removeFromStorage in interface CacheStore
Parameters:
mh - the message reference
Throws:
javax.jms.JMSException - for any error
See Also:
removeFromStorage(MessageReference)

getDataDirectory

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

Specified by:
getDataDirectory in interface CacheStoreMBean
Returns:
The DataDirectory value
See Also:
CacheStoreMBean.getDataDirectory()

setDataDirectory

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

Specified by:
setDataDirectory in interface CacheStoreMBean
Parameters:
newDataDirectory - The new DataDirectory value
See Also:
CacheStoreMBean.setDataDirectory(java.lang.String)

startService

protected void startService()
                     throws Exception
This gets called to start the service.

Throws:
Exception

getInstance

public Object getInstance()
Description copied from interface: CacheStoreMBean
Get the instance

Specified by:
getInstance in interface CacheStoreMBean
Returns:
the cache store
See Also:
CacheStoreMBean#getCacheStoreInstance()


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