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

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

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

origin: wildfly/wildfly

protected void sendJoinResponses(JoinRsp jr, Collection<Address> joiners) {
  if(jr == null || joiners == null || joiners.isEmpty())
    return;
  Buffer marshalled_jr=marshal(jr);
  for(Address joiner: joiners) {
    log.trace("%s: sending join-rsp to %s: view=%s (%d mbrs)", local_addr, joiner, jr.getView(), jr.getView().size());
    sendJoinResponse(marshalled_jr, joiner);
  }
}
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: 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 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

protected void sendJoinResponses(JoinRsp jr, Collection<Address> joiners) {
  if(jr == null || joiners == null || joiners.isEmpty())
    return;
  Buffer marshalled_jr=marshal(jr);
  for(Address joiner: joiners) {
    log.trace("%s: sending join-rsp to %s: view=%s (%d mbrs)", local_addr, joiner, jr.getView(), jr.getView().size());
    sendJoinResponse(marshalled_jr, joiner);
  }
}
origin: org.jgroups/com.springsource.org.jgroups

/** 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.getVid() : null;
  if(tmp_vid != null && gms.view_id != null && tmp_vid.compareTo(gms.view_id) > 0) {
    gms.installView(v);
  }
}
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());
  }
}
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

tmp_view=rsp.getView();
if(tmp_digest == null || tmp_view == null) {
  if(log.isErrorEnabled())
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;
}
org.jgroups.protocols.pbcastJoinRspgetView

Popular methods of JoinRsp

  • <init>
  • getDigest
  • getFailReason
  • serializedSize

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JButton (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 21 Best Atom Packages for 2021
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