use of org.infinispan.util.concurrent.locks.RemoteLockCommand in project infinispan by infinispan.
the class SingleRpcCommand method invokeAsync.
@Override
public CompletionStage<?> invokeAsync(ComponentRegistry componentRegistry) throws Throwable {
command.init(componentRegistry);
InvocationContextFactory icf = componentRegistry.getInvocationContextFactory().running();
InvocationContext ctx = icf.createRemoteInvocationContextForCommand(command, getOrigin());
if (command instanceof RemoteLockCommand) {
ctx.setLockOwner(((RemoteLockCommand) command).getKeyLockOwner());
}
if (log.isTraceEnabled())
log.tracef("Invoking command %s, with originLocal flag set to %b", command, ctx.isOriginLocal());
return componentRegistry.getInterceptorChain().running().invokeAsync(ctx, command);
}
use of org.infinispan.util.concurrent.locks.RemoteLockCommand in project infinispan by infinispan.
the class BaseLockingAction method getAndUpdateFilteredKeys.
protected final List<Object> getAndUpdateFilteredKeys(ActionState state) {
List<Object> filteredKeys = state.getFilteredKeys();
if (filteredKeys == null) {
RemoteLockCommand remoteLockCommand = state.getCommand();
Collection<?> rawKeys = remoteLockCommand.getKeysToLock();
filteredKeys = new ArrayList<>(rawKeys.size());
filterByLockOwner(rawKeys, filteredKeys);
state.updateFilteredKeys(filteredKeys);
}
return filteredKeys;
}
Aggregations