org.jboss.ejb.plugins.cmp.jdbc2.schema
Class TableCache
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.ejb.plugins.cmp.jdbc2.schema.TableCache
- All Implemented Interfaces:
- Cache (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)
- public class TableCache
- extends ServiceMBeanSupport (src)
- implements Cache (src)
Simple LRU cache. Items are evicted when maxCapacity is exceeded.
Fields inherited from interface org.jboss.ejb.plugins.cmp.jdbc2.schema.Cache (src) |
NONE |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary |
TableCache(org.w3c.dom.Element conf)
|
TableCache(int partitionIndex,
int initialCapacity,
int maxCapacity)
|
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TableCache
public TableCache(int partitionIndex,
int initialCapacity,
int maxCapacity)
TableCache
public TableCache(org.w3c.dom.Element conf)
throws DeploymentException (src)
registerListener
public void registerListener(Cache.Listener (src) listener)
size
public int size()
getMaxCapacity
public int getMaxCapacity()
setMaxCapacity
public void setMaxCapacity(int maxCapacity)
getMinCapacity
public int getMinCapacity()
lock
public void lock()
- Specified by:
lock
in interface Cache (src)
lock
public void lock(java.lang.Object key)
- Specified by:
lock
in interface Cache (src)
unlock
public void unlock()
- Specified by:
unlock
in interface Cache (src)
unlock
public void unlock(java.lang.Object key)
- Specified by:
unlock
in interface Cache (src)
getFields
public java.lang.Object[] getFields(java.lang.Object pk)
- Specified by:
getFields
in interface Cache (src)
getRelations
public java.lang.Object[] getRelations(java.lang.Object pk)
- Specified by:
getRelations
in interface Cache (src)
put
public void put(Transaction (src) tx,
java.lang.Object pk,
java.lang.Object[] fields,
java.lang.Object[] relations)
- Specified by:
put
in interface Cache (src)
remove
public void remove(Transaction (src) tx,
java.lang.Object pk)
- Specified by:
remove
in interface Cache (src)
contains
public boolean contains(Transaction (src) tx,
java.lang.Object pk)
- Specified by:
contains
in interface Cache (src)
lockForUpdate
public void lockForUpdate(Transaction (src) tx,
java.lang.Object pk)
throws java.lang.Exception
- Specified by:
lockForUpdate
in interface Cache (src)
- Throws:
java.lang.Exception
releaseLock
public void releaseLock(Transaction (src) tx,
java.lang.Object pk)
throws java.lang.Exception
- Specified by:
releaseLock
in interface Cache (src)
- Throws:
java.lang.Exception
flush
public void flush()
- Specified by:
flush
in interface Cache (src)
toString
public java.lang.String toString()