Tabnine Logo
JoinRsp.getDigest
Code IndexAdd Tabnine to your IDE (free)

How to use
getDigest
method
in
org.jgroups.protocols.pbcast.JoinRsp

Best Java code snippets using org.jgroups.protocols.pbcast.JoinRsp.getDigest (Showing top 7 results out of 315)

origin: wildfly/wildfly

protected boolean isJoinResponseValid(final JoinRsp rsp) {
  if(rsp.getFailReason() != null)
    throw new SecurityException(rsp.getFailReason());
  Digest tmp_digest=rsp.getDigest();
  if(tmp_digest == null || tmp_digest.capacity() == 0) {
    log.warn("%s: digest is empty: digest=%s", gms.local_addr, rsp.getDigest());
    return false;
  }
  if(!tmp_digest.contains(gms.local_addr)) {
    log.error("%s: digest in JOIN_RSP does not contain myself; join response: %s", gms.local_addr, rsp);
    return false;
  }
  if(rsp.getView() == null) {
    log.error("%s: JoinRsp has a null view, skipping it", gms.local_addr);
    return false;
  }
  return true;
}
origin: wildfly/wildfly

/** In case we get a different JOIN_RSP from a previous JOIN_REQ sent by us (as a client), we simply apply the
 * new view if it is greater than ours
 *
 * @param join_rsp
 */
public void handleJoinResponse(JoinRsp join_rsp) {
  View v=join_rsp.getView();
  ViewId tmp_vid=v != null? v.getViewId() : null;
  ViewId my_view=gms.getViewId();
  if(tmp_vid != null && my_view != null && tmp_vid.compareToIDs(my_view) > 0) {
    Digest d=join_rsp.getDigest();
    gms.installView(v, d);
  }
}
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.jboss.eap/wildfly-client-all

protected boolean isJoinResponseValid(final JoinRsp rsp) {
  if(rsp.getFailReason() != null)
    throw new SecurityException(rsp.getFailReason());
  Digest tmp_digest=rsp.getDigest();
  if(tmp_digest == null || tmp_digest.capacity() == 0) {
    log.warn("%s: digest is empty: digest=%s", gms.local_addr, rsp.getDigest());
    return false;
  }
  if(!tmp_digest.contains(gms.local_addr)) {
    log.error("%s: digest in JOIN_RSP does not contain myself; join response: %s", gms.local_addr, rsp);
    return false;
  }
  if(rsp.getView() == null) {
    log.error("%s: JoinRsp has a null view, skipping it", gms.local_addr);
    return false;
  }
  return true;
}
origin: org.jboss.eap/wildfly-client-all

/** In case we get a different JOIN_RSP from a previous JOIN_REQ sent by us (as a client), we simply apply the
 * new view if it is greater than ours
 *
 * @param join_rsp
 */
public void handleJoinResponse(JoinRsp join_rsp) {
  View v=join_rsp.getView();
  ViewId tmp_vid=v != null? v.getViewId() : null;
  ViewId my_view=gms.getViewId();
  if(tmp_vid != null && my_view != null && tmp_vid.compareToIDs(my_view) > 0) {
    Digest d=join_rsp.getDigest();
    gms.installView(v, d);
  }
}
origin: org.jgroups/com.springsource.org.jgroups

MutableDigest tmp_digest=new MutableDigest(rsp.getDigest());
tmp_view=rsp.getView();
if(tmp_digest == null || tmp_view == null) {
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.protocols.pbcastJoinRspgetDigest

Popular methods of JoinRsp

  • <init>
  • getFailReason
  • getView
  • serializedSize

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Github Copilot alternatives
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