public <V> V runInContext(Callable<V> callable) throws Throwable { FutureTask<V> task = new FutureTask<V>(callable); runInContext(task); try { return task.get(); } catch (ExecutionException e) { throw e.getCause(); } }
public <V> V runInContext(Callable<V> callable) throws Throwable { FutureTask<V> task = new FutureTask<V>(callable); runInContext(task); try { return task.get(); } catch (ExecutionException e) { throw e.getCause(); } }
public <V> V runInContext(Callable<V> callable) throws Throwable { FutureTask<V> task = new FutureTask<V>(callable); runInContext(task); try { return task.get(); } catch (ExecutionException e) { throw e.getCause(); } }
@Override public void disconnected() { if (workContext.getSessionId() != null) { workContext.runInContext(new Runnable() { @Override public void run() { try { csr.getClientService(ILogon.class).logoff(); } catch (Exception e) { LogManager.logDetail(LogConstants.CTX_TRANSPORT, e, "Exception closing client instance"); //$NON-NLS-1$ } } }); } }
private void load() throws TeiidComponentException, TeiidProcessingException { try { if (newWorkContext != null) { newWorkContext.runInContext(new Callable<Void>() { @Override public Void call() throws Exception { loadingTupleSource.nextTuple(); return null; } }); } else { loadingTupleSource.nextTuple(); } } catch (Throwable e) { rethrow(e); } }
private void loadViaRefresh(final CommandContext context, final String tableName, VDBMetaData vdb, MatTableInfo info) throws TeiidProcessingException, TeiidComponentException { info.setAsynchLoad(); DQPWorkContext workContext = createWorkContext(context, vdb); final String viewName = tableName.substring(RelationalPlanner.MAT_PREFIX.length()); workContext.runInContext(new Runnable() { @Override public void run() { executor.execute(REFRESH_SQL, Arrays.asList(viewName, Boolean.FALSE)); } }); }
private void load() throws TeiidComponentException, TeiidProcessingException { try { if (newWorkContext != null) { newWorkContext.runInContext(new Callable<Void>() { @Override public Void call() throws Exception { loadingTupleSource.nextTuple(); return null; } }); } else { loadingTupleSource.nextTuple(); } } catch (Throwable e) { rethrow(e); } }
private void load() throws TeiidComponentException, TeiidProcessingException { try { if (newWorkContext != null) { newWorkContext.runInContext(new Callable<Void>() { @Override public Void call() throws Exception { loadingTupleSource.nextTuple(); return null; } }); } else { loadingTupleSource.nextTuple(); } } catch (Throwable e) { rethrow(e); } }
private void loadViaRefresh(final CommandContext context, final String tableName, VDBMetaData vdb, MatTableInfo info) throws TeiidProcessingException, TeiidComponentException { info.setAsynchLoad(); DQPWorkContext workContext = createWorkContext(context, vdb); final String viewName = tableName.substring(RelationalPlanner.MAT_PREFIX.length()); workContext.runInContext(new Runnable() { @Override public void run() { executor.execute(REFRESH_SQL, Arrays.asList(viewName, Boolean.FALSE)); } }); }
private void loadViaRefresh(final CommandContext context, final String tableName, VDBMetaData vdb, MatTableInfo info) throws TeiidProcessingException, TeiidComponentException { info.setAsynchLoad(); DQPWorkContext workContext = createWorkContext(context, vdb); final String viewName = tableName.substring(RelationalPlanner.MAT_PREFIX.length()); workContext.runInContext(new Runnable() { @Override public void run() { executor.execute(REFRESH_SQL, Arrays.asList(viewName, Boolean.FALSE)); } }); }
@Override public void run() { if (workContext.getSecurityHelper() != null) { //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated workContext.getSecurityHelper().clearSecurityContext(); } workContext.runInContext(r); }
@Override public void run() { synchronized (this) { while (workContext == null) { try { this.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } } workContext.runInContext(new Runnable() { @Override public void run() { try { chunkFuture = core.requestNextLobChunk(1, reqMsg.getExecutionId(), bt.getReferenceStreamId()); } catch (TeiidProcessingException e) { e.printStackTrace(); } } }); } }
@Override public void run() { if (workContext.getSecurityHelper() != null) { //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated workContext.getSecurityHelper().clearSecurityContext(); } workContext.runInContext(r); }
@Override public void run() { if (workContext.getSecurityHelper() != null) { //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated workContext.getSecurityHelper().clearSecurityContext(); } workContext.runInContext(r); }
private void processMessagePacket(Message packet) { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_TRANSPORT, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_TRANSPORT, "processing message:" + packet); //$NON-NLS-1$ } workContext.getSession().setLastPingTime(System.currentTimeMillis()); if (this.workContext.getSecurityHelper() != null) { this.workContext.getSecurityHelper().clearSecurityContext(); } final ServerWorkItem work = new ServerWorkItem(this, packet.getMessageKey(), packet, this.csr); this.workContext.runInContext(work); }
return workContext.runInContext(new Callable<Object>() { public Object call() throws Exception { return arg1.invoke(service, arg2);
workContext.runInContext(new Callable<Void>() { @Override public Void call() throws Exception {
workContext.runInContext(new Callable<Void>() { @Override public Void call() throws Exception {
workContext.runInContext(new Callable<Void>() { @Override public Void call() throws Exception {
message.runInContext(r);