Tabnine Logo
Digest$Entry.getHighestReceivedSeqno
Code IndexAdd Tabnine to your IDE (free)

How to use
getHighestReceivedSeqno
method
in
org.jgroups.util.Digest$Entry

Best Java code snippets using org.jgroups.util.Digest$Entry.getHighestReceivedSeqno (Showing top 14 results out of 315)

origin: wildfly/wildfly

/** Update my own digest from a digest received by somebody else. Returns whether the update was successful.
 *  Needs to be called with a lock on digest */
@GuardedBy("lock")
protected void updateLocalDigest(Digest d, Address sender) {
  StringBuilder sb=null;
  if(log.isTraceEnabled())
    sb=new StringBuilder().append(local_addr).append(": handling digest from ").append(sender).append(":\nmine:   ")
     .append(printDigest(digest)).append("\nother:  ").append(printDigest(d));
  for(Digest.Entry entry: d) {
    Address mbr=entry.getMember();
    long hd=entry.getHighestDeliveredSeqno(), hr=entry.getHighestReceivedSeqno();
    // compute the minimum of the highest seqnos deliverable (for garbage collection)
    long[] seqnos=digest.get(mbr);
    if(seqnos == null)
      continue;
    long my_hd=seqnos[0];
    long my_hr=seqnos[1]; // (for retransmission of last missing message)
    if(my_hd == -1) // -1 means the seqno hasn't been set yet
      my_hd=hd;
    long new_hd=Math.min(my_hd, hd);
    long new_hr=Math.max(my_hr, hr);
    digest.set(mbr, new_hd, new_hr);
  }
  if(sb != null) // implies log.isTraceEnabled() == true
    log.trace(sb.append("\nresult: ").append(printDigest(digest)).append("\n"));
}
origin: wildfly/wildfly

  continue;
long hd=entry.getHighestDeliveredSeqno();
long hr=entry.getHighestReceivedSeqno();
origin: org.jgroups/com.springsource.org.jgroups

public void add(Digest digest) {
  if(digest != null) {
    checkSealed();
    Map.Entry<Address,Entry> entry;
    Address key;
    Entry val;
    for(Iterator<Map.Entry<Address,Entry>> it=digest.senders.entrySet().iterator(); it.hasNext();) {
      entry=it.next();
      key=entry.getKey();
      val=entry.getValue();
      add(key, val.getLow(), val.getHighestDeliveredSeqno(), val.getHighestReceivedSeqno());
    }
  }
}
origin: org.jgroups/com.springsource.org.jgroups

val=entry.getValue();
high_seqno_delivered=val.getHighestDeliveredSeqno();
high_seqno_received=val.getHighestReceivedSeqno();
origin: org.jgroups/com.springsource.org.jgroups

low=val.getLow();
highest_seen_seqno=val.getHighestReceivedSeqno();  // highest *received* seqno
origin: org.jboss.eap/wildfly-client-all

  continue;
long hd=entry.getHighestDeliveredSeqno();
long hr=entry.getHighestReceivedSeqno();
origin: org.jboss.eap/wildfly-client-all

/** Update my own digest from a digest received by somebody else. Returns whether the update was successful.
 *  Needs to be called with a lock on digest */
@GuardedBy("lock")
protected void updateLocalDigest(Digest d, Address sender) {
  StringBuilder sb=null;
  if(log.isTraceEnabled())
    sb=new StringBuilder().append(local_addr).append(": handling digest from ").append(sender).append(":\nmine:   ")
     .append(printDigest(digest)).append("\nother:  ").append(printDigest(d));
  for(Digest.Entry entry: d) {
    Address mbr=entry.getMember();
    long hd=entry.getHighestDeliveredSeqno(), hr=entry.getHighestReceivedSeqno();
    // compute the minimum of the highest seqnos deliverable (for garbage collection)
    long[] seqnos=digest.get(mbr);
    if(seqnos == null)
      continue;
    long my_hd=seqnos[0];
    long my_hr=seqnos[1]; // (for retransmission of last missing message)
    if(my_hd == -1) // -1 means the seqno hasn't been set yet
      my_hd=hd;
    long new_hd=Math.min(my_hd, hd);
    long new_hr=Math.max(my_hr, hr);
    digest.set(mbr, new_hd, new_hr);
  }
  if(sb != null) // implies log.isTraceEnabled() == true
    log.trace(sb.append("\nresult: ").append(printDigest(digest)).append("\n"));
}
origin: org.jgroups/com.springsource.org.jgroups

/**
 * Similar to add(), but if the sender already exists, its seqnos will be modified (no new entry) as follows:
 * <ol>
 * <li>this.low_seqno=min(this.low_seqno, low_seqno)
 * <li>this.highest_delivered_seqno=max(this.highest_delivered_seqno, highest_delivered_seqno)
 * <li>this.highest_received_seqno=max(this.highest_received_seqno, highest_received_seqno)
 * </ol>
 * If the sender doesn not exist, a new entry will be added (provided there is enough space)
 */
public void merge(Address sender, long low_seqno, long highest_delivered_seqno, long highest_received_seqno) {
  if(sender == null) {
    if(log.isErrorEnabled()) log.error("sender == null");
    return;
  }
  checkSealed();
  Entry entry=senders.get(sender);
  if(entry == null) {
    add(sender, low_seqno, highest_delivered_seqno, highest_received_seqno);
  }
  else {
    Entry new_entry=new Entry(Math.min(entry.getLow(), low_seqno),
                 Math.max(entry.getHighestDeliveredSeqno(), highest_delivered_seqno),
                 Math.max(entry.getHighestReceivedSeqno(), highest_received_seqno));
    senders.put(sender, new_entry);
  }
}
origin: org.jgroups/com.springsource.org.jgroups

/**
 * Adds a digest to this digest. This digest must have enough space to add the other digest; otherwise an error
 * message will be written. For each sender in the other digest, the merge() method will be called.
 */
public void merge(Digest digest) {
  if(digest == null) {
    if(log.isErrorEnabled()) log.error("digest to be merged with is null");
    return;
  }
  checkSealed();
  Map.Entry<Address,Entry> entry;
  Address sender;
  Entry val;
  for(Iterator<Map.Entry<Address,Entry>> it=digest.senders.entrySet().iterator(); it.hasNext();) {
    entry=it.next();
    sender=entry.getKey();
    val=entry.getValue();
    if(val != null) {
      merge(sender, val.getLow(), val.getHighestDeliveredSeqno(), val.getHighestReceivedSeqno());
    }
  }
}
origin: org.jboss.eap/wildfly-client-all

public MutableDigest set(Digest digest) {
  if(digest == null)
    return this;
  for(Entry entry: digest)
    set(entry.getMember(), entry.getHighestDeliveredSeqno(), entry.getHighestReceivedSeqno());
  return this;
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Adds a digest to this digest. For each sender in the other digest, the merge() method will be called.
 */
public MutableDigest merge(Digest digest) {
  if(digest == null)
    return this;
  for(Entry entry: digest)
    merge(entry.getMember(), entry.getHighestDeliveredSeqno(), entry.getHighestReceivedSeqno());
  return this;
}
origin: org.jgroups/com.springsource.org.jgroups

/**
 * Increments the sender's high_seqno by 1.
 */
public void incrementHighestDeliveredSeqno(Address sender) {
  Entry entry=senders.get(sender);
  if(entry == null)
    return;
  checkSealed();
  Entry new_entry=new Entry(entry.getLow(), entry.getHighestDeliveredSeqno() +1, entry.getHighestReceivedSeqno());
  senders.put(sender, new_entry);
}
origin: wildfly/wildfly

/**
 * Adds a digest to this digest. For each sender in the other digest, the merge() method will be called.
 */
public MutableDigest merge(Digest digest) {
  if(digest == null)
    return this;
  for(Entry entry: digest)
    merge(entry.getMember(), entry.getHighestDeliveredSeqno(), entry.getHighestReceivedSeqno());
  return this;
}
origin: wildfly/wildfly

public MutableDigest set(Digest digest) {
  if(digest == null)
    return this;
  for(Entry entry: digest)
    set(entry.getMember(), entry.getHighestDeliveredSeqno(), entry.getHighestReceivedSeqno());
  return this;
}
org.jgroups.utilDigest$EntrygetHighestReceivedSeqno

Popular methods of Digest$Entry

  • <init>
  • getHighest
    Return the max of the highest delivered or highest received seqno
  • getHighestDeliveredSeqno
  • getMember
  • check
  • getLow

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ImageIO (javax.imageio)
  • JLabel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Vim plugins
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