public Task writeInvocation(final HandlerContext ctx, final Invocation invocation) throws Exception { LocalObjects.LocalObjectEntry localObjectEntry = objects.findLocalObjectByReference(invocation.getToReference()); if (localObjectEntry != null) { return scheduleLocalInvocation(localObjectEntry, invocation); } return ctx.write(invocation); }
@SuppressWarnings("unchecked") protected void onInvoke(final HandlerContext ctx, final Invocation invocation) { LocalObjects.LocalObjectEntry localObjectEntry = objects.findLocalObjectByReference(invocation.getToReference()); if (localObjectEntry != null) { scheduleLocalInvocation(localObjectEntry, invocation); return; } ctx.fireRead(invocation); }
private Task<Void> onActivate(HandlerContext ctx, final Invocation invocation) { // this must run serialized by the remote reference key. LocalObjects.LocalObjectEntry<Object> entry = objects.findLocalObjectByReference(invocation.getToReference()); if (entry == null) { objects.registerLocalObject(invocation.getToReference()); entry = objects.findLocalObjectByReference(invocation.getToReference()); } // queues the invocation final LocalObjects.LocalObjectEntry<Object> theEntry = entry; final Task result = entry.run(target -> performInvocation(ctx, invocation, theEntry, target)); if (invocation.getCompletion() != null) { InternalUtils.linkFuturesOnError(result, invocation.getCompletion()); } // yielding since we blocked the entry before running on activate (serialized execution) return Task.done(); }
protected void onInvoke(final HandlerContext ctx, final Invocation invocation) LocalObjects.LocalObjectEntry localObjectEntry = objects.findLocalObjectByReference(invocation.getToReference()); if (localObjectEntry != null)
final LocalObjects.LocalObjectEntry<Object> entry = objects.findLocalObjectByReference(toReference); if (entry != null)