/** * {@link Context#contains(java.net.URI)} */ protected boolean contextContains(URI elementId) { synchronized (contextBrokerLock) { return getContext().contains(elementId); } }
/** * {@link Context#peek(java.net.URI)} */ protected <T extends ContextElement> T contextPeek(URI elementId) { synchronized (contextBrokerLock) { return getContext().peek(elementId); } }
/** * {@link Context#releaseAll(java.net.URI)} */ protected void contextReleaseAll(URI elementId) { synchronized (contextBrokerLock) { Logger.getLogger(this.getClass()).debug("Releasing All id: " + elementId + " * " + strHashCode()); getContext().releaseAll(elementId); } }
/** * {@link Context#request(net.faerie.core.ContextElement)} */ protected <T extends ContextElement> T contextRequest(T element) { synchronized (contextBrokerLock) { String classifier = (element instanceof Entity) ? Entity.class.getSimpleName() : (element instanceof Attribute) ? Attribute.class.getSimpleName() : Relationship.class .getSimpleName(); Logger.getLogger(this.getClass()) .debug("Requesting " + classifier + ": " + element + " * " + strHashCode()); return getContext().request(element); } }
/** * {@link Context#release(java.net.URI)} */ protected boolean contextRelease(URI elementId) { synchronized (contextBrokerLock) { Logger.getLogger(this.getClass()).debug("Releasing id: " + elementId + " * " + strHashCode()); return getContext().release(elementId); } }
/** * {@link Context#releaseAll()} */ protected void contextReleaseAll() { synchronized (contextBrokerLock) { Logger.getLogger(this.getClass()).debug("Releasing All * " + strHashCode()); getContext().releaseAll(); } }