|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.serial.Replacer | +--org.erights.e.extern.persist.PersistenceReplacer
Untamed: Used to specialize the SerializationStream so that, on checkpointing, a live object may be replaced by a different object to be checkpointed as its representative.
The corresponding revived object is not simply this representative. It is
this representative as resolved by
org.erights.e.extern.persist.PersistenceReviver
.
Field Summary | |
private boolean |
myIsStrict
Do we blow up on a NEAR reference to a non-Persistent (strict), or do we instead serialize a broken reference (non-strict)? |
private ConstMap |
myScalpel
A mapping from nears to Strings. |
Constructor Summary | |
PersistenceReplacer(ConstMap scalpel)
Enabled: isStrict defaults to true. |
|
PersistenceReplacer(ConstMap scalpel,
boolean isStrict)
Enabled: |
Method Summary | |
Object |
substitute(Object ref)
Enabled: XXX comment is stale: |
Methods inherited from class org.erights.e.elib.serial.Replacer |
getSerializationStream, record, recordFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final ConstMap myScalpel
private final boolean myIsStrict
Constructor Detail |
public PersistenceReplacer(ConstMap scalpel)
public PersistenceReplacer(ConstMap scalpel, boolean isStrict)
Method Detail |
public Object substitute(Object ref)
If ref isPersistent
, then this currently just returns ref; otherwise an
appropriately broken reference.
This way, a non-persistent object in a graph doesn't prevent the graph from being checkpointed. However, that doesn't mean such a partially-broken graph will be revivable or useful.
substitute
in class Replacer
ref
- The object that needs to somehow get serialized.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |