/** * {@inheritDoc} * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals( Object obj ) { if (obj == this) return true; if (this.getClass().isInstance(obj)) { LockBranchRequest that = (LockBranchRequest)obj; if (this.lockTimeoutInMillis() != that.lockTimeoutInMillis()) return false; if (!this.at().isSame(that.at())) return false; if (this.lockScope() != that.lockScope()) return false; if (!this.inWorkspace().equals(that.inWorkspace())) return false; return true; } return false; }
protected void assertNextRequestIsLock( Location at, LockScope lockScope, long lockTimeout ) { Request request = executedRequests.poll(); assertThat(request, is(instanceOf(LockBranchRequest.class))); LockBranchRequest lock = (LockBranchRequest)request; assertThat(lock.at(), is(at)); assertThat(lock.lockScope(), is(lockScope)); assertThat(lock.lockTimeoutInMillis(), is(lockTimeout)); }
@Override public void process( LockBranchRequest request ) { WorkspaceType workspace = getWorkspace(request, request.inWorkspace()); NodeType node = getTargetNode(workspace, request, request.at()); if (node == null) return; txn.lockNode(workspace, node, request.lockScope(), request.lockTimeoutInMillis()); Location actualLocation = getActualLocation(workspace, request.at(), node); request.setActualLocation(actualLocation); recordChange(request); }
@Override public void process( LockBranchRequest request ) { MapWorkspace workspace = getWorkspace(request, request.inWorkspace()); MapNode node = getTargetNode(workspace, request, request.at()); if (node == null) return; workspace.lockNode(node, request.lockScope(), request.lockTimeoutInMillis()); Location actualLocation = getActualLocation(request.at(), node); request.setActualLocation(actualLocation); recordChange(request); }
@Override public void process( LockBranchRequest request ) { PathWorkspace workspace = getWorkspace(request, request.inWorkspace()); PathNode node = getTargetNode(workspace, request, request.at()); if (node == null) return; workspace.lockNode(node, request.lockScope(), request.lockTimeoutInMillis()); request.setActualLocation(Location.create(node.getPath(), node.getUuid())); recordChange(request); }
request.lockScope(), request.lockTimeoutInMillis()); federatedRequest.add(pushDownRequest, proxy.isSameLocationAsOriginal(), false, proxy.projection());