Methods Summary |
---|
protected void | acquireRemoteLocks(org.jboss.util.id.GUID globalTxId, java.util.List guids)
// HOOKS FOR DISTRIBUTION
|
public void | createObjects(java.util.List newObjects)
log.trace("in create Objects");
for (int i = 0; i < newObjects.size(); i++)
{
DistributedState state = (DistributedState)newObjects.get(i);
synchronized (tableLock)
{
objectTable.put(state.getGUID(), new WeakReference(state.getObject()));
stateTable.put(state.getGUID(), state);
}
}
sendNewObjects(newObjects);
|
public java.lang.Object | getObject(org.jboss.util.id.GUID guid)
synchronized (tableLock)
{
WeakReference ref = (WeakReference)objectTable.get(guid);
if (ref != null)
{
return ref.get();
}
return null;
}
|
public DistributedState | getState(org.jboss.util.id.GUID guid)
synchronized (tableLock)
{
return (DistributedState)stateTable.get(guid);
}
|
public void | noTxUpdate(DistributedUpdate update)
// HOOKS FOR DISTRIBUTION
|
public void | putObject(org.jboss.util.id.GUID guid, java.lang.Object obj)
synchronized (tableLock)
{
objectTable.put(guid, new WeakReference(obj));
}
|
public void | putState(org.jboss.util.id.GUID guid, java.lang.Object obj)
synchronized (tableLock)
{
stateTable.put(guid, obj);
}
|
public void | registerUpdate(javax.transaction.Transaction tx, DistributedState state)
if (tx == null) return;
GUID guid = state.getGUID();
DistributedStateSynchronization synch = (DistributedStateSynchronization)txSynch.get(tx);
if (synch == null)
{
synch = new DistributedStateSynchronization(tx);
txSynch.set(tx, synch);
tx.registerSynchronization(synch);
synch.updates().put(guid, state);
return;
}
if (synch.updates().containsKey(guid)) return;
synch.updates().put(guid, state);
|
protected void | releaseHeldLocks(java.util.List locks)
log.trace("releaseHeldLocks");
for (int i = 0; i < locks.size(); i++)
{
try
{
DistributedState state = (DistributedState)locks.get(i);
state.releaseWriteLock();
}
catch (Exception ignored)
{
// ignore exception because we want to release everything no matter what
}
}
log.trace("end releaseHeldLocks");
|
protected void | sendClusterUpdatesAndRelease(org.jboss.util.id.GUID globalTxId, java.util.List clusterUpdates)
// HOOKS FOR DISTRIBUTION
|
public void | sendNewObjects(java.util.List newObjects)
// NOT YET IMPLEMENTED
|