[jbosscache-commits] JBoss Cache SVN: r5587 - in core/trunk/src/main/java/org/jboss/cache: invocation and 1 other directory.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Fri Apr 18 07:09:55 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-04-18 07:09:55 -0400 (Fri, 18 Apr 2008)
New Revision: 5587
Modified:
core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
Log:
Reverted Mircea's changes
Modified: core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-04-18 09:50:57 UTC (rev 5586)
+++ core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-04-18 11:09:55 UTC (rev 5587)
@@ -222,7 +222,8 @@
public Map getDataDirect()
{
if (data == null) return Collections.emptyMap();
- return Collections.unmodifiableMap(data);
+// return Collections.unmodifiableMap(data);
+ return data;
}
public Object put(Object key, Object value)
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-04-18 09:50:57 UTC (rev 5586)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-04-18 11:09:55 UTC (rev 5587)
@@ -333,7 +333,6 @@
public void move(Fqn<?> nodeToMove, Fqn<?> newParent) throws NodeNotExistsException
{
- checkState();
MoveCommand command = commandsFactory.buildMoveCommand(nodeToMove, newParent);
invoke(command);
}
@@ -355,7 +354,6 @@
public void evict(Fqn<?> fqn, boolean recursive)
{
- checkState();
List<Fqn> nodesToEvict = cacheData.getNodesForEviction(fqn, recursive);
for (Fqn aFqn : nodesToEvict)
{
@@ -370,7 +368,6 @@
public V get(Fqn<?> fqn, K key)
{
- checkState();
GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(fqn, key, true);
return (V) invoke(command);
}
@@ -382,7 +379,6 @@
public boolean removeNode(Fqn<?> fqn)
{
- checkState();
// special case if we are removing the root. Remove all children instead.
if (fqn.isRoot())
{
@@ -410,11 +406,6 @@
}
}
- private void checkState()
- {
- if (!getCacheStatus().allowInvocations()) throw new IllegalStateException("Cache is not in STARTED state");
- }
-
public boolean removeNode(String fqn)
{
return removeNode(Fqn.fromString(fqn));
@@ -422,7 +413,6 @@
public NodeSPI<K, V> getNode(Fqn<?> fqn)
{
- checkState();
GetNodeCommand command = commandsFactory.buildGetNodeCommand(fqn);
return (NodeSPI) invoke(command);
}
@@ -434,7 +424,6 @@
public V remove(Fqn<?> fqn, K key) throws CacheException
{
- checkState();
GlobalTransaction tx = transactionHelper.getCurrentTransaction();
RemoveKeyCommand command = commandsFactory.buildRemoveKeyCommand(tx, fqn, key, true);
return (V) invoke(command);
@@ -447,7 +436,6 @@
public void put(Fqn<?> fqn, Map<K, V> data)
{
- checkState();
PutDataMapCommand command = commandsFactory.buildPutDataMapCommand(null, fqn, data, true, false);
invoke(command);
}
@@ -459,7 +447,6 @@
public void putForExternalRead(Fqn<?> fqn, K key, V value)
{
- checkState();
// if the node exists then this should be a no-op.
if (peek(fqn, false, false) == null)
{
@@ -477,7 +464,6 @@
public V put(Fqn<?> fqn, K key, V value)
{
- checkState();
GlobalTransaction tx = transactionHelper.getCurrentTransaction();
PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(tx, fqn, key, value, false, false);
return (V) invoke(command);
@@ -512,7 +498,6 @@
*/
public Map<K, V> getData(Fqn<?> fqn)
{
- checkState();
GetDataMapCommand command = commandsFactory.buildGetDataMapCommand(fqn);
return (Map<K, V>) invoke(command);
}
@@ -538,7 +523,6 @@
*/
public Set<K> getKeys(Fqn<?> fqn)
{
- checkState();
GetKeysCommand command = commandsFactory.buildGetKeysCommand(fqn);
return (Set<K>) invoke(command);
}
@@ -556,7 +540,6 @@
*/
public void clearData(Fqn fqn)
{
- checkState();
GlobalTransaction tx = getCurrentTransaction();
invoke(commandsFactory.buildRemoveDataCommand(tx, fqn, true, false, false));
}
More information about the jbosscache-commits
mailing list