当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 server API Documentation 英文版文档
TableCache (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档
org.jboss.ejb.plugins.cmp.jdbc2.schema
Class TableCache
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.ejb.plugins.cmp.jdbc2.schema.TableCache
- All Implemented Interfaces:
- Cache, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, TableCacheMBean
- public class TableCache
- extends org.jboss.system.ServiceMBeanSupport
- implements Cache, TableCacheMBean
Simple LRU cache. Items are evicted when maxCapacity is exceeded.
- Version:
- $Revision: 1.8.4.2 $
- Author:
- Alexey Loubyansky
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache |
NONE |
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 |
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, startService, stop, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
TableCache
public TableCache(int partitionIndex,
int initialCapacity,
int maxCapacity)
TableCache
public TableCache(Element conf)
throws org.jboss.deployment.DeploymentException
registerListener
public void registerListener(Cache.Listener listener)
- Specified by:
registerListener
in interface TableCacheMBean
size
public int size()
- Specified by:
size
in interface TableCacheMBean
getMaxCapacity
public int getMaxCapacity()
- Specified by:
getMaxCapacity
in interface TableCacheMBean
setMaxCapacity
public void setMaxCapacity(int maxCapacity)
- Specified by:
setMaxCapacity
in interface TableCacheMBean
getMinCapacity
public int getMinCapacity()
- Specified by:
getMinCapacity
in interface TableCacheMBean
lock
public void lock()
- Specified by:
lock
in interface Cache
lock
public void lock(Object key)
- Specified by:
lock
in interface Cache
unlock
public void unlock()
- Specified by:
unlock
in interface Cache
unlock
public void unlock(Object key)
- Specified by:
unlock
in interface Cache
getFields
public Object[] getFields(Object pk)
- Specified by:
getFields
in interface Cache
getRelations
public Object[] getRelations(Object pk)
- Specified by:
getRelations
in interface Cache
put
public void put(Transaction tx,
Object pk,
Object[] fields,
Object[] relations)
- Specified by:
put
in interface Cache
remove
public void remove(Transaction tx,
Object pk)
- Specified by:
remove
in interface Cache
contains
public boolean contains(Transaction tx,
Object pk)
- Specified by:
contains
in interface Cache
lockForUpdate
public void lockForUpdate(Transaction tx,
Object pk)
throws Exception
- Specified by:
lockForUpdate
in interface Cache
- Throws:
Exception
releaseLock
public void releaseLock(Transaction tx,
Object pk)
throws Exception
- Specified by:
releaseLock
in interface Cache
- Throws:
Exception
flush
public void flush()
- Specified by:
flush
in interface Cache
toString
public String toString()
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.