[jboss-cvs] JBossCache/src/org/jboss/cache/config ...
Manik Surtani
msurtani at belmont.prod.atl2.jboss.com
Tue Aug 29 13:50:14 EDT 2006
User: msurtani
Date: 06/08/29 13:50:14
Modified: src/org/jboss/cache/config Option.java
Log:
Fixed RPCManager scoping issues
Revision Changes Path
1.10 +138 -108 JBossCache/src/org/jboss/cache/config/Option.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Option.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/Option.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- Option.java 22 Aug 2006 12:27:51 -0000 1.9
+++ Option.java 29 Aug 2006 17:50:14 -0000 1.10
@@ -34,7 +34,6 @@
/**
* Bypasses the entire interceptor chain and talks to the cache directly. Use with extreme care, may cause a lot of data corruption and in certain cache configurations, my cause
* the cache not to function at all. Intended strictly for internal use only.
- *
*/
public void setBypassInterceptorChain(boolean bypassInterceptorChain)
{
@@ -42,7 +41,6 @@
}
/**
- *
* @since 1.4.0
*/
public boolean isSuppressLocking()
@@ -52,6 +50,7 @@
/**
* Suppresses acquiring locks for the given invocation. Used with pessimistic locking only. Use with extreme care, may lead to a breach in data integrity!
+ *
* @since 1.4.0
*/
public void setSuppressLocking(boolean suppressLocking)
@@ -61,7 +60,6 @@
/**
- *
* @since 1.3.0
*/
public boolean isFailSilently()
@@ -71,6 +69,7 @@
/**
* suppress any failures in your cache operation, including version mismatches with optimistic locking, timeouts obtaining locks, transaction rollbacks. If this is option is set, the method invocation will __never fail or throw an exception__, although it may not succeed. With this option enabled the call will <b>not</b> participate in any ongoing transactions even if a transaction is running.
+ *
* @since 1.3.0
*/
public void setFailSilently(boolean failSilently)
@@ -80,6 +79,7 @@
/**
* only applies to put() and remove() methods on the cache.
+ *
* @since 1.3.0
*/
public boolean isCacheModeLocal()
@@ -89,8 +89,9 @@
/**
* overriding CacheMode from REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC, INVALIDATION_ASYNC to LOCAL. Only applies to put() and remove() methods on the cache.
- * @since 1.3.0
+ *
* @param cacheModeLocal
+ * @since 1.3.0
*/
public void setCacheModeLocal(boolean cacheModeLocal)
{
@@ -98,7 +99,6 @@
}
/**
- *
* @since 1.3.0
*/
public DataVersion getDataVersion()
@@ -108,6 +108,7 @@
/**
* Passing in an {@link org.jboss.cache.optimistic.DataVersion} instance when using optimistic locking will override the default behaviour of internally generated version info and allow the caller to handle data versioning.
+ *
* @since 1.3.0
*/
public void setDataVersion(DataVersion dataVersion)
@@ -116,7 +117,6 @@
}
/**
- *
* @since 1.4.0
*/
public boolean getForceDataGravitation()
@@ -128,6 +128,7 @@
* Enables data gravitation calls if a cache miss is detected when using <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheBuddyReplicationDesign">Buddy Replication</a>.
* Enabled only for a given invocation, and only useful if <code>autoDataGravitation</code> is set to <code>false</code>.
* See <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheBuddyReplicationDesign">Buddy Replication</a> documentation for more details.
+ *
* @since 1.4.0
*/
public void setForceDataGravitation(boolean enableDataGravitation)
@@ -153,4 +154,33 @@
return (Option) super.clone();
}
+
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ final Option option = (Option) o;
+
+ if (bypassInterceptorChain != option.bypassInterceptorChain) return false;
+ if (cacheModeLocal != option.cacheModeLocal) return false;
+ if (failSilently != option.failSilently) return false;
+ if (forceDataGravitation != option.forceDataGravitation) return false;
+ if (suppressLocking != option.suppressLocking) return false;
+ if (dataVersion != null ? !dataVersion.equals(option.dataVersion) : option.dataVersion != null) return false;
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = (failSilently ? 1 : 0);
+ result = 29 * result + (cacheModeLocal ? 1 : 0);
+ result = 29 * result + (dataVersion != null ? dataVersion.hashCode() : 0);
+ result = 29 * result + (suppressLocking ? 1 : 0);
+ result = 29 * result + (forceDataGravitation ? 1 : 0);
+ result = 29 * result + (bypassInterceptorChain ? 1 : 0);
+ return result;
+ }
}
More information about the jboss-cvs-commits
mailing list