|
GemFire 6.6.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gemstone.gemfire.CopyHelper
public final class CopyHelper
A static helper for optimally creating copies. Creating copies
of cache values provides improved concurrency as well as isolation.
For transactions, creating a copy is the guaranteed way to enforce
"Read Committed" isolation on changes to cache
Entries.
Here is a simple example of how to use CopyHelper.copy
Object o = r.get("stringBuf");
StringBuffer s = (StringBuffer) CopyHelper.copy(o);
s.append("... and they lived happily ever after. The End.");
r.put("stringBuf", s);
Cloneable,
Serializable,
DataSerializer,
GemFireCache.setCopyOnRead(boolean),
CacheTransactionManager| Method Summary | ||
|---|---|---|
static
|
copy(T o)
Makes a copy of the specified object. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T copy(T o)
Makes a copy of the specified object. Copies can only be made if the original is Cloneable or serializable by GemFire.
o - the original object that a copy is needed of
CopyException - if copying fails because a class could not
be found or could not be serialized.
|
GemFire 6.6.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||