@Test(timeout=300) public void testGetWithThreadedSet() throws InterruptedException, ExecutionException, TimeoutException { final DistributedFuture<String, String> f = new DistributedFuture<String, String>(null, null, null); Thread t = new Thread(){ @Override public void run() { try { Thread.currentThread().sleep(100); f.set("Hello"); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } }; t.start(); Assert.assertEquals("Hello", f.get()); }
public boolean set(V value) { return super.set(value); }
DistributedFuture extends AbstractFuture<V> { public boolean set(V value) { return super.set(value); } }
DistributedFuture extends AbstractFuture<V> { public boolean set(V value) { return super.set(value); } DistributedFuture(IExecutorTopologyService<GROUP> topologyService, GROUP group, UUID taskId); }
DistributedFuture extends AbstractFuture<V> { public boolean set(V value) { return super.set(value); } DistributedFuture(IExecutorTopologyService<GROUP> topologyService, GROUP group, UUID taskId); @Override boolean cancel(boolean mayInterruptIfRunning); boolean setCancelled(boolean mayInterruptIfRunning); boolean setException(Throwable e); boolean set(V value); long getCreatedTime(); }
DistributedFuture extends AbstractFuture<V> { public boolean set(V value) { return super.set(value); } DistributedFuture(IExecutorTopologyService<GROUP> topologyService, GROUP group, UUID taskId); @Override boolean cancel(boolean mayInterruptIfRunning); boolean setCancelled(boolean mayInterruptIfRunning); boolean setException(Throwable e); boolean set(V value); long getCreatedTime();  }