|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.retek.commons.component.DistributedContext
Manages identity for DistributedObject
s. A context is essentially a state pool
which holds working copies of distributed objects. Each context only has a single instance
of the distributed object with a given identity; in other words, the fundamental contract
of this framework is:
DistributedContext
+DistributedReference
= unique instance ofDistributedObject
Field Summary | |
---|---|
protected java.util.Map |
statePool
|
Constructor Summary | |
---|---|
DistributedContext()
Deprecated. until 2-25 by Paul C: pass in a name for this context, explaining where it was created. This gives nice debug messages when your context shows up dirty or closed or mismatched or whatever. |
|
DistributedContext(boolean forMigration,
java.lang.String createdBy)
remove when migration is complete |
|
DistributedContext(java.lang.String name)
|
Method Summary | |
---|---|
void |
checkOpen()
Throws an appropriate exception if the context is closed or poisoned. |
void |
close()
Closes the context, checking for dirty objects. |
void |
discard()
Closes the context, regardless of whether there are dirty objects. |
java.lang.String |
dumpAll()
|
java.lang.String |
dumpDirty()
|
boolean |
isClosed()
|
boolean |
isDirty()
|
boolean |
isTempContextForMigration()
remove when migration is complete |
void |
poison(java.lang.Throwable poisonCause)
Marks the context as corrupted. |
void |
purge(DistributedReference ref)
|
void |
registerNew(DistributedObject dobj)
|
DistributedObject |
resolve(DistributedReference ref)
|
java.util.List |
resolve(java.util.List distributedReferences)
|
java.util.Set |
resolve(java.util.Set distributedRefs)
|
DistributedObject |
specialResolveForUseInCommonsOnly(DistributedReference ref,
boolean errorIfDeleted)
|
java.util.Set |
specialResolveForUseInCommonsOnly(java.util.Set distributedReferences,
boolean errorIfDeleted)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Map statePool
Constructor Detail |
public DistributedContext()
public DistributedContext(java.lang.String name)
public DistributedContext(boolean forMigration, java.lang.String createdBy)
Method Detail |
public boolean isClosed()
public boolean isDirty()
public void close()
DirtyContextException
- If the context holds dirty objects.
In this case, the context remains open.public void discard()
public void poison(java.lang.Throwable poisonCause)
public void checkOpen()
public java.util.Set resolve(java.util.Set distributedRefs) throws SystemException
SystemException
public java.util.Set specialResolveForUseInCommonsOnly(java.util.Set distributedReferences, boolean errorIfDeleted) throws SystemException
SystemException
Dto.mergePropertiesFrom(com.retek.commons.component.DistributedContext, com.retek.commons.component.impl.Dto)
public DistributedObject specialResolveForUseInCommonsOnly(DistributedReference ref, boolean errorIfDeleted) throws SystemException
SystemException
public java.util.List resolve(java.util.List distributedReferences) throws SystemException
SystemException
public DistributedObject resolve(DistributedReference ref) throws SystemException
SystemException
public void purge(DistributedReference ref)
public void registerNew(DistributedObject dobj)
public java.lang.String toString()
public java.lang.String dumpAll()
public java.lang.String dumpDirty()
public boolean isTempContextForMigration()
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |