/** * Indicate that this phase is in use. Increments the reference count. * * @return A {@link Token} to represent the phase use. */ public synchronized Token use() { Token token = getToken(); if (token == null) { token = new Token(); tokenRef = new WeakReference(token); } ++refCount; return token; }
recordingPhaseToken.release(); recordingPhaseToken = null;
} finally { try { currentPhase = freeList.new Phase(committedPhaseToken.getPhase()); } catch (IOException ex) { throw new SimpleXAResourceException(
public synchronized void release() { try { if (token != null) { token.release(); } } finally { phase = null; token = null; } }
/** * Release this reference to the encapsulating phase. */ public void release() { assert freeListToken != null : "Invalid Token"; freeListToken.release(); freeListToken = null; }