Author: tolusha
Date: 2009-11-06 05:19:12 -0500 (Fri, 06 Nov 2009)
New Revision: 482
Added:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/LockCacheLoader.java
Log:
EXOJCR-205: add new class
Added:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/LockCacheLoader.java
===================================================================
---
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/LockCacheLoader.java
(rev 0)
+++
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/LockCacheLoader.java 2009-11-06
10:19:12 UTC (rev 482)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not,
see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.storage.jbosscache;
+
+import org.jboss.cache.CacheException;
+import org.jboss.cache.Modification;
+
+import java.util.List;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy
Bazko</a>
+ * @version $Id$
+ */
+public class LockCacheLoader extends AbstractWriteOnlyCacheLoader
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void put(List<Modification> modifications) throws Exception
+ {
+ for (Modification m : modifications)
+ {
+ switch (m.getType())
+ {
+ case PUT_DATA :
+ // put(m.getFqn(), m.getData());
+ break;
+ case PUT_DATA_ERASE :
+ // removeData(m.getFqn());
+ // put(m.getFqn(), m.getData());
+ break;
+ case PUT_KEY_VALUE :
+ // put(m.getFqn(), m.getKey(), m.getValue());
+ break;
+ case REMOVE_DATA :
+ // removeData(m.getFqn());
+ break;
+ case REMOVE_KEY_VALUE :
+ // remove(m.getFqn(), m.getKey());
+ break;
+ case REMOVE_NODE :
+ // remove(m.getFqn());
+ break;
+ case MOVE :
+ // involve moving all children too
+ // move(m.getFqn(), m.getFqn2());
+ break;
+ default :
+ throw new CacheException("Unknown modification " +
m.getType());
+ }
+ }
+ }
+
+}
Property changes on:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/LockCacheLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native