/** * Create a request to lock a branch or node * * @param workspaceName the name of the workspace containing the node; may not be null * @param target the location of the top node in the existing branch that is to be locked * @param lockScope the {@link LockBranchRequest#lockScope()} scope of the lock * @param lockTimeoutInMillis the number of milliseconds that the lock should last before the lock times out; zero (0) * indicates that the connector default should be used * @return the request; never null * @throws IllegalArgumentException if any of the parameters are null */ public LockBranchRequest lockBranch( String workspaceName, Location target, LockScope lockScope, long lockTimeoutInMillis ) { return process(new LockBranchRequest(target, workspaceName, lockScope, lockTimeoutInMillis)); }
/** * {@inheritDoc} * <p> * This method does not clone the results. * </p> * * @see org.modeshape.graph.request.ChangeRequest#clone() */ @Override public LockBranchRequest clone() { LockBranchRequest request = new LockBranchRequest(actualLocation != null ? actualLocation : at, workspaceName, isDeep, lockTimeoutInMillis); request.setActualLocation(actualLocation); return request; }
/** * Create a request to lock a branch or node * * @param workspaceName the name of the workspace containing the node; may not be null * @param target the location of the top node in the existing branch that is to be locked * @param lockScope the {@link LockBranchRequest#lockScope()} scope of the lock * @param lockTimeoutInMillis the number of milliseconds that the lock should last before the lock times out; zero (0) * indicates that the connector default should be used * @return this builder for method chaining; never null * @throws IllegalArgumentException if any of the parameters are null */ public BatchRequestBuilder lockBranch( String workspaceName, Location target, LockScope lockScope, long lockTimeoutInMillis ) { return add(new LockBranchRequest(target, workspaceName, lockScope, lockTimeoutInMillis)); }
ProxyNode proxy = projectedNode.asProxy(); LockBranchRequest pushDownRequest = new LockBranchRequest(proxy.location(), proxy.workspaceName(), request.lockScope(), request.lockTimeoutInMillis()); federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());