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

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

Best Java code snippets using org.jgroups.util.Digest$Entry.getHighestDeliveredSeqno (Showing top 20 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 highest_delivered_seqno=entry.getHighestDeliveredSeqno();
origin: wildfly/wildfly

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

val=entry.getValue();
low=val.getLow();
highest_seqno=val.getHighestDeliveredSeqno();      // highest *delivered* seqno
origin: org.jboss.eap/wildfly-client-all

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

Entry e1=this.get(address);
Entry e2=other.get(address);
if(e1.getHighestDeliveredSeqno() != e2.getHighestDeliveredSeqno()) {
  long low=Math.min(e1.highest_delivered_seqno, e2.highest_delivered_seqno);
  long high=max(e1.highest_delivered_seqno, e2.highest_delivered_seqno);
origin: org.jgroups/com.springsource.org.jgroups

highest_delivered_seqno=val.getHighestDeliveredSeqno();
low_seqno=val.getLow();
origin: org.jboss.eap/wildfly-client-all

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

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

initial_seqno=val.getHighestDeliveredSeqno();
win=createNakReceiverWindow(sender, initial_seqno, val.getLow());
xmit_table.put(sender, win);
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.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.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: 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: wildfly/wildfly

if(member == null)
  continue;
long hd=entry.getHighestDeliveredSeqno();
long hr=entry.getHighestReceivedSeqno();
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$EntrygetHighestDeliveredSeqno

Popular methods of Digest$Entry

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

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Join (org.hibernate.mapping)
  • Sublime Text for Python
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