|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.cache.loader.JDBCCacheLoader
JDBC CacheLoader implementation.
This implementation uses one table. The table consists of three columns:
| Constructor Summary | |
JDBCCacheLoader()
|
|
| Method Summary | |
void |
commit(Object tx)
Commits a transaction. |
void |
create()
|
void |
destroy()
|
boolean |
exists(Fqn name)
Checks that there is a row for the fqn in the database. |
Map |
get(Fqn name)
Returns a map representing a node. |
Object |
get(Fqn name,
Object key)
Loads an attribute from the database. |
Set |
getChildrenNames(Fqn fqn)
Fetches child node names (not pathes). |
byte[] |
loadEntireState()
Loads the entire state from the filesystem and returns it as a byte buffer. |
void |
prepare(Object tx,
List modifications,
boolean one_phase)
First phase in transaction commit process. |
void |
put(Fqn name,
Map attributes)
Adds attributes from the passed in map to the existing node. |
Object |
put(Fqn name,
Object key,
Object value)
Adds/overrides a value in a node for a key. |
void |
put(List modifications)
Inserts all modifications to the backend store. |
void |
remove(Fqn name)
Removes a node and all its children. |
Object |
remove(Fqn name,
Object key)
Removes attribute's value for a key. |
void |
removeData(Fqn name)
Nullifies the node. |
void |
rollback(Object tx)
Rolls back a transaction. |
void |
setCache(TreeCache c)
This method allows the CacheLoader to set the TreeCache, therefore allowing the CacheLoader to invoke methods of the TreeCache. |
void |
setConfig(Properties props)
Sets the configuration. |
void |
start()
|
void |
stop()
|
void |
storeEntireState(byte[] state)
Store the state given as a byte buffer to the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JDBCCacheLoader()
| Method Detail |
public void setConfig(Properties props)
CacheLoaderService.create() and Service.start()
setConfig in interface CacheLoaderprops - A list of properties, defined in the XML filepublic void setCache(TreeCache c)
CacheLoader
setCache in interface CacheLoaderc - The cache on which this loader workspublic Set getChildrenNames(Fqn fqn) throws Exception
getChildrenNames in interface CacheLoaderfqn - parent fqn
Exceptionpublic Object get(Fqn name, Object key) throws Exception
get in interface CacheLoadername - node's fqnkey - attribute's key
Exceptionpublic Map get(Fqn name) throws Exception
get in interface CacheLoadername - node's fqn
Exceptionpublic boolean exists(Fqn name) throws Exception
exists in interface CacheLoadername - node's fqn
Exceptionpublic Object put(Fqn name, Object key, Object value) throws Exception
put in interface CacheLoadername - node's fqnkey - attribute's keyvalue - attribute's value
Exceptionpublic void put(Fqn name, Map attributes) throws Exception
put in interface CacheLoadername - node's fqnattributes - attributes
Exceptionpublic void put(List modifications) throws Exception
CacheLoader
put in interface CacheLoadermodifications - A ListExceptionpublic Object remove(Fqn name, Object key) throws Exception
remove in interface CacheLoadername - node's namekey - attribute's key
Exceptionpublic void remove(Fqn name) throws Exception
remove in interface CacheLoadername - node's fqn
Exceptionpublic void removeData(Fqn name) throws Exception
removeData in interface CacheLoadername - node's fqn
Exceptionpublic void prepare(Object tx, List modifications, boolean one_phase) throws Exception
prepare in interface CacheLoadertx - something representing transactionmodifications - a list of modificationsone_phase - indicates whether it's one or two phase commit transaction
Exceptionpublic void commit(Object tx) throws Exception
commit in interface CacheLoadertx - the tx to commit
Exceptionpublic void rollback(Object tx)
rollback in interface CacheLoadertx - the tx to rollback
public byte[] loadEntireState()
throws Exception
loadEntireState in interface CacheLoaderException
public void storeEntireState(byte[] state)
throws Exception
storeEntireState in interface CacheLoaderstate -
Exception
public void create()
throws Exception
create in interface org.jboss.system.ServiceException
public void start()
throws Exception
start in interface org.jboss.system.ServiceExceptionpublic void stop()
stop in interface org.jboss.system.Servicepublic void destroy()
destroy in interface org.jboss.system.Service
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||