congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Promise.hasResult
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: wildfly/wildfly

protected boolean installViewIfValidJoinRsp(final Promise<JoinRsp> join_promise, boolean block_for_rsp) {
  boolean success=false;
  JoinRsp rsp=null;
  try {
    if(join_promise.hasResult())
      rsp=join_promise.getResult(1, true);
    else if(block_for_rsp)
      rsp=join_promise.getResult(gms.join_timeout, true);
    return success=rsp != null && isJoinResponseValid(rsp) && installView(rsp.getView(), rsp.getDigest());
  }
  finally {
    if(success)
      gms.sendViewAck(rsp.getView().getCreator());
  }
}
origin: org.jgroups/com.springsource.org.jgroups

boolean shouldWaitForUnblock = flush_supported && receive_blocks && !singletonMember && !flush_unblock_promise.hasResult();
if(shouldWaitForUnblock){
  try{
origin: org.jboss.eap/wildfly-client-all

protected boolean installViewIfValidJoinRsp(final Promise<JoinRsp> join_promise, boolean block_for_rsp) {
  boolean success=false;
  JoinRsp rsp=null;
  try {
    if(join_promise.hasResult())
      rsp=join_promise.getResult(1, true);
    else if(block_for_rsp)
      rsp=join_promise.getResult(gms.join_timeout, true);
    return success=rsp != null && isJoinResponseValid(rsp) && installView(rsp.getView(), rsp.getDigest());
  }
  finally {
    if(success)
      gms.sendViewAck(rsp.getView().getCreator());
  }
}
org.jgroups.utilPromisehasResult

Javadoc

Checks whether result is available. Does not block.

Popular methods of Promise

  • _getResultWithTimeout
    Blocks until a result is available, or timeout milliseconds have elapsed. Needs to be called with a
  • getResult
  • getResultWithTimeout
  • reset
  • setResult
    Sets the result and notifies any threads waiting for it
  • <init>
  • doWait

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • Menu (java.awt)
  • Permission (java.security)
    Legacy security code; do not use.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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