[jboss-cvs] JBossCache/src/org/jboss/cache/loader ...
Vladmir Blagojevic
vladimir.blagojevic at jboss.com
Thu Aug 31 17:34:54 EDT 2006
User: vblagojevic
Date: 06/08/31 17:34:54
Modified: src/org/jboss/cache/loader AsyncCacheLoader.java
Log:
store state cannot be done asynchronously
Revision Changes Path
1.16 +30 -97 JBossCache/src/org/jboss/cache/loader/AsyncCacheLoader.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AsyncCacheLoader.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/AsyncCacheLoader.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- AsyncCacheLoader.java 31 Aug 2006 14:56:45 -0000 1.15
+++ AsyncCacheLoader.java 31 Aug 2006 21:34:54 -0000 1.16
@@ -267,37 +267,11 @@
delegateTo.rollback( tx );
}
- /*public byte[] loadEntireState() throws Exception
- {
- return delegateTo.loadEntireState();
- }*/
-
- /*public void storeState(byte[] state, Fqn subtree) throws Exception
- {
- Modification mod = new Modification(Modification.STORE_STATE, subtree, null, state);
- enqueue(mod);
- }*/
-
public void setRegionManager(RegionManager manager)
{
delegateTo.setRegionManager(manager);
}
- /**
- * Stores the entire state.
- * This is processed asynchronously.
- */
- /*public void storeEntireState(byte[] state) throws Exception
- {
- Modification mod = new Modification(Modification.STORE_STATE, null, null, state);
- enqueue(mod);
- }*/
-
- /*public byte[] loadState(Fqn subtree) throws Exception
- {
- return new byte[0];
- }*/
-
public void loadEntireState(ObjectOutputStream os) throws Exception
{
delegateTo.loadEntireState(os);
@@ -310,14 +284,12 @@
public void storeEntireState(ObjectInputStream is) throws Exception
{
- Modification mod = new Modification(Modification.STORE_STATE, null, null, is);
- enqueue(mod);
+ delegateTo.storeEntireState(is);
}
public void storeState(Fqn subtree, ObjectInputStream is) throws Exception
{
- Modification mod = new Modification(Modification.STORE_STATE, subtree, null, is);
- enqueue(mod);
+ delegateTo.storeState(subtree, is);
}
public void create() throws Exception
@@ -442,48 +414,9 @@
else
{
Modification mod = (Modification)o;
- if (mod.getType() == Modification.STORE_STATE)
- {
- log.trace("storeState");
- ObjectInputStream is = (ObjectInputStream)mod.getValue();
- storeState(mod.getFqn(),is);
- }
- else
- {
mods.add(mod);
}
}
- }
-
- /*private void storeState(Fqn fqn, byte b[]) {
- try
- {
- if (fqn == null)
- delegateTo.storeEntireState(b);
- else
- delegateTo.storeState(b, fqn);
- }
- catch (Exception e)
- {
- if (log.isWarnEnabled()) log.warn("Failed to store " + e);
- log.debug("Exception: ", e);
- }
- }*/
-
- private void storeState(Fqn fqn, ObjectInputStream is) {
- try
- {
- if (fqn == null)
- delegateTo.storeEntireState(is);
- else
- delegateTo.storeState(fqn,is);
- }
- catch (Exception e)
- {
- if (log.isWarnEnabled()) log.warn("Failed to store " + e);
- log.debug("Exception: ", e);
- }
- }
private void put(List mods) {
try
More information about the jboss-cvs-commits
mailing list