/** * Creates a new memory node in preparation for storage. */ private NodeSPI createTempNode(Fqn fqn, TransactionContext transactionContext) throws Exception { NodeSPI n = createNodes(fqn, transactionContext); n.setDataLoaded(false); if (trace) { log.trace("createTempNode n " + n); } return n; }
private void removeDataLegacy(Fqn fqn) { NodeSPI n = peek(fqn); if (n == null) { log.warn("node " + fqn + " not found"); return; } n.clearDataDirect(); n.setDataLoaded(false); }
@SuppressWarnings("unchecked") private NodeSPI<?, ?> createNodes(Fqn fqn, TransactionContext transactionContext) throws Exception { Object[] results = dataContainer.createNodes(fqn); List<NodeSPI<?, ?>> createdNodes = (List<NodeSPI<?, ?>>) results[0]; NodeSPI lastCreated = null; for (NodeSPI node : createdNodes) { node.setDataLoaded(false); if (transactionContext != null) { transactionContext.addDummyNodeCreatedByCacheLoader(node.getFqn()); } lastCreated = node; } // mark the leaf node as data loaded since that is what we are doing in this interceptor. if (lastCreated != null) lastCreated.setDataLoaded(true); // regardless of whether the last node was created, return it. return (NodeSPI) results[1]; }
private void replace(InvocationContext ctx, Fqn fqn) throws InterruptedException { NodeSPI n = helper.wrapNodeForReading(ctx, fqn, true); if (n instanceof NullMarkerNode) { ctx.getLookedUpNodes().remove(fqn); } n = helper.wrapNodeForWriting(ctx, fqn, true, true, true, false, false); n.setDataLoaded(true); }
protected void removeData(NodeSPI n, InvocationContext ctx) throws CacheException { notifier.notifyNodeInvalidated(fqn, true, ctx); n.clearDataDirect(); n.setDataLoaded(false); notifier.notifyNodeInvalidated(fqn, false, ctx); }
@Override protected Object handleRemoveDataCommand(InvocationContext ctx, ClearDataCommand command) throws Throwable { if (!inTransaction()) { loader.removeData(command.getFqn()); // we need to mark this node as data loaded NodeSPI n = ctx.lookUpNode(command.getFqn()); if (n != null) { n.setDataLoaded(true); } } return invokeNextInterceptor(ctx, command); }
node.setDataLoaded(false); return false; node.setDataLoaded(false); node.getDelegationTarget().clear(); return true;
if (isNew && n != null) n.setDataLoaded(false); for (NodeSPI node = n; node != null && node.isCreated(); node = node.getParentDirect()) node.setDataLoaded(false);
if (child.isCreated()) child.setDataLoaded(false); if ((isMove || isActivation) && recursive) child.setDataLoaded(true);
node.setDataLoaded(false); return false;
targetNode.setDataLoaded(false); targetNode.setChildrenLoaded(false);
child.setDataLoaded(true);
prepareContextOptions(); cache.put(fqn, attrs); cache.getNode(fqn).setDataLoaded(false); cache.getNode(fqn).setChildrenLoaded(false);
target.setDataLoaded(false); target.setChildrenLoaded(false);