[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Tue Aug 29 07:54:10 EDT 2006
User: msurtani
Date: 06/08/29 07:54:10
Modified: src/org/jboss/cache Cache.java CacheSPI.java
DataNode.java
Log:
Moved the getConfiguration() method from CacheSPI to Cache
Revision Changes Path
1.7 +140 -116 JBossCache/src/org/jboss/cache/Cache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Cache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Cache.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Cache.java 21 Aug 2006 17:05:49 -0000 1.6
+++ Cache.java 29 Aug 2006 11:54:10 -0000 1.7
@@ -6,40 +6,52 @@
*/
package org.jboss.cache;
+import org.jboss.cache.config.Configuration;
+
import java.util.List;
-import java.util.Set;
import java.util.Map;
+import java.util.Set;
/**
* Along with {@link Node}, this is the central construct of JBoss Cache.
- *
+ * <p/>
* The cache is constructed using a {@link org.jboss.cache.factories.CacheFactory}.
- *
+ * <p/>
* The cache is essentially a wrapper around the default root {@link Node}. Basic operations on the cache are
* inherited from {@link Node}.
*
+ * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @see Node
* @see org.jboss.cache.factories.CacheFactory
* @since 2.0.0
- * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
*/
public interface Cache extends Node
{
/**
+ * Retrieves the configuration of this cache.
+ *
+ * @return the configuration.
+ */
+ Configuration getConfiguration();
+
+ /**
* Convenience method to return the default root as a {@link Node}. The default root, represented by this
* {@link Cache} instance, is a {@link Node} anyway though.
+ *
* @return the current {@link Cache} instance, as a {@link Node}
*/
Node getRoot();
/**
* Adds a {@link CacheListener} to the entire cache
+ *
* @param l listener to add
*/
void addCacheListener(CacheListener l);
/**
* Adds a {@link CacheListener} to a given region.
+ *
* @param region
* @param l
*/
@@ -47,12 +59,14 @@
/**
* Removes a {@link CacheListener} from the cache
+ *
* @param l listener to remove
*/
void removeCacheListener(CacheListener l);
/**
* Removes a {@link CacheListener} from a given region.
+ *
* @param region
* @param l
*/
@@ -60,12 +74,14 @@
/**
* Retrieves an immutable {@link List} of {@link CacheListener}s attached to the cache.
+ *
* @return an immutable {@link List} of {@link CacheListener}s attached to the cache.
*/
Set<CacheListener> getCacheListeners();
/**
* Retrieves an immutable {@link List} of {@link CacheListener}s attached to a specific region.
+ *
* @return an immutable {@link List} of {@link CacheListener}s attached to a specific region.
*/
Set<CacheListener> getCacheListeners(Fqn region);
@@ -73,6 +89,7 @@
/**
* Convenience method that allows for direct access to the data in a {@link Node}.
+ *
* @param fqn <b><i>absolute</i></b> {@link Fqn} to the {@link Node} to be accessed.
* @param key
* @param value
@@ -81,6 +98,7 @@
/**
* Convenience method that allows for direct access to the data in a {@link Node}.
+ *
* @param fqn
* @param data
*/
@@ -88,16 +106,20 @@
/**
* Convenience method that allows for direct access to the data in a {@link Node}.
+ *
* @param fqn <b><i>absolute</i></b> {@link Fqn} to the {@link Node} to be accessed.
* @param key
*/
void remove(Fqn fqn, Object key);
- /** Removes a node based on the (absolute) Fqn passed in.**/
+ /**
+ * Removes a node based on the (absolute) Fqn passed in.*
+ */
void removeNode(Fqn fqn);
/**
* Convenience method that allows for direct access to the data in a {@link Node}.
+ *
* @param fqn <b><i>absolute</i></b> {@link Fqn} to the {@link Node} to be accessed.
* @param key
*/
@@ -105,6 +127,7 @@
/**
* Eviction call that evicts the specified {@link Node} from memory.
+ *
* @param fqn <b><i>absolute</i></b> {@link Fqn} to the {@link Node} to be evicted.
* @param recursive
*/
@@ -112,9 +135,10 @@
/**
* Retrieves a {@link Region} for a given {@link Fqn}. If the region does not exist, one is created.
+ *
* @return a Region
* @throws UnsupportedOperationException if the region cannot be defined.
- * @see org.jboss.cache.Region
+ * @see Region
*/
Region getRegion(Fqn fqn);
1.12 +83 -97 JBossCache/src/org/jboss/cache/CacheSPI.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheSPI.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheSPI.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- CacheSPI.java 25 Aug 2006 14:10:09 -0000 1.11
+++ CacheSPI.java 29 Aug 2006 11:54:10 -0000 1.12
@@ -7,15 +7,14 @@
package org.jboss.cache;
import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.cache.config.Configuration;
import org.jboss.cache.eviction.RegionManager;
import org.jboss.cache.interceptors.Interceptor;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.CacheLoaderManager;
+import org.jboss.cache.marshall.MethodCall;
import org.jboss.cache.notifications.Notifier;
import org.jboss.cache.statetransfer.StateTransferManager;
import org.jgroups.Address;
-import org.jboss.cache.marshall.MethodCall;
import javax.management.ObjectName;
import javax.transaction.TransactionManager;
@@ -25,21 +24,14 @@
/**
* A more detailed interface to {@link Cache}, which is used when writing plugins for or extending JBoss Cache.
*
+ * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @see NodeSPI
* @see Cache
* @since 2.0.0
- * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
*/
public interface CacheSPI extends Cache
{
/**
- * Retrieves the configuration of this cache.
- * @return the configuration.
- */
- Configuration getConfiguration();
-
- /**
- *
* @return an immutable {@link List} of {@link Interceptor}s configured for this cache.
*/
List<Interceptor> getInterceptorChain();
@@ -47,18 +39,17 @@
/**
* Retrieves the configured {@link CacheLoader}. If more than one {@link CacheLoader} is configured, this method
* returns an instance of {@link org.jboss.cache.loader.ChainingCacheLoader}.
+ *
* @return null if no {@link CacheLoader} is configured.
*/
CacheLoader getCacheLoader();
/**
- *
* @return an instance of {@link BuddyManager} if buddy replication is enabled, null otherwise.
*/
BuddyManager getBuddyManager();
/**
- *
* @return the current {@link TransactionTable}
*/
TransactionTable getTransactionTable();
@@ -69,31 +60,26 @@
RPCManager getRPCManager();
/**
- *
* @return the current {@link org.jboss.cache.aop.statetransfer.PojoStateTransferManager}
*/
StateTransferManager getStateTransferManager();
/**
- *
* @return the local address of this cache in a cluster. Null if running in local mode.
*/
Object getLocalAddress();
/**
- *
* @return a {@link List} of members in the cluster. Null if running in local mode.
*/
List<Address> getMembers();
/**
- *
* @return the name of the cluster. Null if running in local mode.
*/
String getClusterName();
/**
- *
* @return the version string of the cache.
*/
String getVersion();
1.18 +0 -2 JBossCache/src/org/jboss/cache/DataNode.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DataNode.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/DataNode.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- DataNode.java 25 Aug 2006 16:30:46 -0000 1.17
+++ DataNode.java 29 Aug 2006 11:54:10 -0000 1.18
@@ -21,8 +21,6 @@
{
NONE, READ, WRITE}
- ;
-
/**
* Initialized property for debugging "print_lock_details"
*/
More information about the jboss-cvs-commits
mailing list