Examples of TimedCallable


Examples of EDU.oswego.cs.dl.util.concurrent.TimedCallable

/*     */           {
/*     */           }
/* 705 */           return null;
/*     */         }
/*     */       };
/* 708 */       Callable timedCallable = new TimedCallable(callable, 2000L);
/*     */       try
/*     */       {
/* 712 */         timedCallable.call();
/*     */       }
/*     */       catch (Throwable t)
/*     */       {
/*     */       }
/*     */
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.TimedCallable

        {         
        }
        return null;
        } };
     
      Callable timedCallable = new TimedCallable(callable, CLOSE_TIMEOUT);
     
      try
      {
        timedCallable.call();
      }
      catch (Throwable t)
      {
        //Ignore - the server might have already closed - so this is ok
      }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.TimedCallable

/* 199 */         SwingWorker.this.finished();
/*     */       }
/*     */     };
/* 204 */     long msecs = getTimeout();
/* 205 */     if (msecs != 0L) {
/* 206 */       TimedCallable tc = new TimedCallable(function, msecs);
/* 207 */       tc.setThreadFactory(getThreadFactory());
/* 208 */       function = tc;
/*     */     }
/*     */
/* 211 */     this.result.setter(function).run();
/* 212 */     SwingUtilities.invokeLater(doFinished);
View Full Code Here

Examples of net.sf.xbus.base.core.timeoutcall.TimedCallable

    {
      timeout = Integer.MAX_VALUE;
    }

    ProgramCaller caller = new ProgramCaller(mDestination, callData);
    TimedCallable tc = new TimedCallable(caller, timeout);
    try
    {
      retString = (String) tc.call();
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

Examples of net.sf.xbus.base.core.timeoutcall.TimedCallable

      timeout = Integer.MAX_VALUE;
    }

    JavaCaller caller = new JavaCaller(mDestination, function, callData,
        mIsText);
    TimedCallable tc = new TimedCallable(caller, timeout);
    try
    {
      retObject = tc.call();
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

Examples of net.sf.xbus.base.core.timeoutcall.TimedCallable

  protected void callAS400Program(AS400 as400, String programName,
      ProgramParameter[] parameters, int timeout) throws XException
  {
    AS400ProgramCaller caller = new AS400ProgramCaller(as400, programName,
        parameters, mConverter);
    TimedCallable tc = new TimedCallable(caller, timeout);
    try
    {
      tc.call();
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

Examples of org.apache.hadoop.hdfs.storageservice.NNLatencyBenchmark.TimedCallable

  }

  @Test
  public void testTimedCallable() throws Exception {
    long start = System.nanoTime();
    double time = new TimedCallable() {
      @Override
      protected void callTimed() throws Exception {
        Thread.sleep(337);
      }
    }.call();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.