Tabnine Logo
Promise._getResultWithTimeout
Code IndexAdd Tabnine to your IDE (free)

How to use
_getResultWithTimeout
method
in
org.jgroups.util.Promise

Best Java code snippets using org.jgroups.util.Promise._getResultWithTimeout (Showing top 5 results out of 315)

origin: wildfly/wildfly

/**
 * Blocks until a result is available, or timeout milliseconds have elapsed
 * @param timeout in ms
 * @return An object
 * @throws TimeoutException If a timeout occurred (implies that timeout > 0)
 */
public T getResultWithTimeout(long timeout) throws TimeoutException {
  return _getResultWithTimeout(timeout);
}
origin: wildfly/wildfly

public T getResultWithTimeout(long timeout, boolean reset) throws TimeoutException {
  if(!reset)
    return _getResultWithTimeout(timeout);
  // the lock is acquired because we want to get the result and reset the promise in the same lock scope; if we had
  // to re-acquire the lock for reset(), some other thread could possibly set a new result before reset() is called !
  lock.lock();
  try {
    return _getResultWithTimeout(timeout);
  }
  finally {
    reset();
    lock.unlock();
  }
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Blocks until a result is available, or timeout milliseconds have elapsed
 * @param timeout in ms
 * @return An object
 * @throws TimeoutException If a timeout occurred (implies that timeout > 0)
 */
public T getResultWithTimeout(long timeout) throws TimeoutException {
  return _getResultWithTimeout(timeout);
}
origin: org.jgroups/com.springsource.org.jgroups

/**
 * Blocks until a result is available, or timeout milliseconds have elapsed
 * @param timeout
 * @return An object
 * @throws TimeoutException If a timeout occurred (implies that timeout > 0)
 */
public Object getResultWithTimeout(long timeout) throws TimeoutException {
  synchronized(this) {
    try {
      return _getResultWithTimeout(timeout);
    }
    finally {
      notifyAll();
    }
  }
}
origin: org.jboss.eap/wildfly-client-all

public T getResultWithTimeout(long timeout, boolean reset) throws TimeoutException {
  if(!reset)
    return _getResultWithTimeout(timeout);
  // the lock is acquired because we want to get the result and reset the promise in the same lock scope; if we had
  // to re-acquire the lock for reset(), some other thread could possibly set a new result before reset() is called !
  lock.lock();
  try {
    return _getResultWithTimeout(timeout);
  }
  finally {
    reset();
    lock.unlock();
  }
}
org.jgroups.utilPromise_getResultWithTimeout

Javadoc

Blocks until a result is available, or timeout milliseconds have elapsed. Needs to be called with lock held

Popular methods of Promise

  • getResult
  • getResultWithTimeout
  • hasResult
    Checks whether result is available. Does not block.
  • reset
  • setResult
    Sets the result and notifies any threads waiting for it
  • <init>
  • doWait

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JList (javax.swing)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now