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

How to use
getHighestDeliverable
method
in
org.jgroups.util.Table

Best Java code snippets using org.jgroups.util.Table.getHighestDeliverable (Showing top 12 results out of 315)

origin: wildfly/wildfly

@ManagedOperation(description="Sends ACKs immediately for entries which are marked as pending (ACK hasn't been sent yet)")
public void sendPendingAcks() {
  for(Map.Entry<Address,ReceiverEntry> entry: recv_table.entrySet()) {
    Address        target=entry.getKey(); // target to send retransmit requests to
    ReceiverEntry  val=entry.getValue();
    Table<Message> win=val != null? val.msgs : null;
    // receiver: send ack for received messages if needed
    if(win != null && val.sendAck())// sendAck() resets send_ack to false
      sendAck(target, win.getHighestDeliverable(), val.connId());
  }
}
origin: wildfly/wildfly

/**
 * Returns a list of missing messages
 * @param max_msgs If > 0, the max number of missing messages to be returned (oldest first), else no limit
 * @return A SeqnoList of missing messages, or null if no messages are missing
 */
public SeqnoList getMissing(int max_msgs) {
  lock.lock();
  try {
    if(size == 0)
      return null;
    long start_seqno=getHighestDeliverable() +1;
    int capacity=(int)(hr - start_seqno);
    int max_size=max_msgs > 0? Math.min(max_msgs, capacity) : capacity;
    if(max_size <= 0)
      return null;
    Missing missing=new Missing(start_seqno, max_size);
    long to=max_size > 0? Math.min(start_seqno + max_size-1, hr-1) : hr-1;
    forEach(start_seqno, to, missing);
    return missing.getMissingElements();
  }
  finally {
    lock.unlock();
  }
}
origin: wildfly/wildfly

  entry.update();
if(dont_loopback_set)
  entry.msgs.purge(entry.msgs.getHighestDeliverable());
break;
origin: wildfly/wildfly

sendAck(target, win.getHighestDeliverable(), val.connId());
origin: wildfly/wildfly

protected void handleBatchReceived(final ReceiverEntry entry, Address sender, List<LongTuple<Message>> msgs, boolean oob) {
  if(is_trace)
    log.trace("%s <-- DATA(%s: %s)", local_addr, sender, printMessageList(msgs));
  int batch_size=msgs.size();
  Table<Message> win=entry.msgs;
  // adds all messages to the table, removing messages from 'msgs' which could not be added (already present)
  boolean added=win.add(msgs, oob, oob? DUMMY_OOB_MSG : null);
  update(entry, batch_size);
  if(batch_size >= ack_threshold)
    sendAck(sender, win.getHighestDeliverable(), entry.connId());
  else
    entry.sendAck(true);
  // OOB msg is passed up. When removed, we discard it. Affects ordering: http://jira.jboss.com/jira/browse/JGRP-379
  if(added && oob) {
    MessageBatch oob_batch=new MessageBatch(local_addr, sender, null, false, MessageBatch.Mode.OOB, msgs.size());
    for(LongTuple<Message> tuple: msgs)
      oob_batch.add(tuple.getVal2());
    deliverBatch(oob_batch);
  }
  removeAndDeliver(win, sender);
}
origin: wildfly/wildfly

/**
 * Check whether the hashtable contains an entry e for {@code sender} (create if not). If
 * e.received_msgs is null and {@code first} is true: create a new AckReceiverWindow(seqno) and
 * add message. Set e.received_msgs to the new window. Else just add the message.
 */
protected void handleDataReceived(final Address sender, long seqno, short conn_id,  boolean first, final Message msg) {
  ReceiverEntry entry=getReceiverEntry(sender, seqno, first, conn_id);
  if(entry == null)
    return;
  update(entry, 1);
  boolean oob=msg.isFlagSet(Message.Flag.OOB);
  final Table<Message> win=entry.msgs;
  boolean added=win.add(seqno, oob? DUMMY_OOB_MSG : msg); // adding the same dummy OOB msg saves space (we won't remove it)
  if(ack_threshold <= 1)
    sendAck(sender, win.getHighestDeliverable(), entry.connId());
  else
    entry.sendAck(true); // will be sent delayed (on the next xmit_interval)
  // An OOB message is passed up immediately. Later, when remove() is called, we discard it. This affects ordering !
  // http://jira.jboss.com/jira/browse/JGRP-377
  if(oob) {
    if(added)
      deliverMessage(msg, sender, seqno);
    // we don't steal work if the message is internal (https://issues.jboss.org/browse/JGRP-1733)
    if(msg.isFlagSet(Message.Flag.INTERNAL)) {
      processInternalMessage(win, sender);
      return;
    }
  }
  removeAndDeliver(win, sender);
}
origin: org.jboss.eap/wildfly-client-all

@ManagedOperation(description="Sends ACKs immediately for entries which are marked as pending (ACK hasn't been sent yet)")
public void sendPendingAcks() {
  for(Map.Entry<Address,ReceiverEntry> entry: recv_table.entrySet()) {
    Address        target=entry.getKey(); // target to send retransmit requests to
    ReceiverEntry  val=entry.getValue();
    Table<Message> win=val != null? val.msgs : null;
    // receiver: send ack for received messages if needed
    if(win != null && val.sendAck())// sendAck() resets send_ack to false
      sendAck(target, win.getHighestDeliverable(), val.connId());
  }
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Returns a list of missing messages
 * @param max_msgs If > 0, the max number of missing messages to be returned (oldest first), else no limit
 * @return A SeqnoList of missing messages, or null if no messages are missing
 */
public SeqnoList getMissing(int max_msgs) {
  lock.lock();
  try {
    if(size == 0)
      return null;
    long start_seqno=getHighestDeliverable() +1;
    int capacity=(int)(hr - start_seqno);
    int max_size=max_msgs > 0? Math.min(max_msgs, capacity) : capacity;
    if(max_size <= 0)
      return null;
    Missing missing=new Missing(start_seqno, max_size);
    long to=max_size > 0? Math.min(start_seqno + max_size-1, hr-1) : hr-1;
    forEach(start_seqno, to, missing);
    return missing.getMissingElements();
  }
  finally {
    lock.unlock();
  }
}
origin: org.jboss.eap/wildfly-client-all

  entry.update();
if(dont_loopback_set)
  entry.msgs.purge(entry.msgs.getHighestDeliverable());
break;
origin: org.jboss.eap/wildfly-client-all

sendAck(target, win.getHighestDeliverable(), val.connId());
origin: org.jboss.eap/wildfly-client-all

protected void handleBatchReceived(final ReceiverEntry entry, Address sender, List<LongTuple<Message>> msgs, boolean oob) {
  if(is_trace)
    log.trace("%s <-- DATA(%s: %s)", local_addr, sender, printMessageList(msgs));
  int batch_size=msgs.size();
  Table<Message> win=entry.msgs;
  // adds all messages to the table, removing messages from 'msgs' which could not be added (already present)
  boolean added=win.add(msgs, oob, oob? DUMMY_OOB_MSG : null);
  update(entry, batch_size);
  if(batch_size >= ack_threshold)
    sendAck(sender, win.getHighestDeliverable(), entry.connId());
  else
    entry.sendAck(true);
  // OOB msg is passed up. When removed, we discard it. Affects ordering: http://jira.jboss.com/jira/browse/JGRP-379
  if(added && oob) {
    MessageBatch oob_batch=new MessageBatch(local_addr, sender, null, false, MessageBatch.Mode.OOB, msgs.size());
    for(LongTuple<Message> tuple: msgs)
      oob_batch.add(tuple.getVal2());
    deliverBatch(oob_batch);
  }
  removeAndDeliver(win, sender);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Check whether the hashtable contains an entry e for {@code sender} (create if not). If
 * e.received_msgs is null and {@code first} is true: create a new AckReceiverWindow(seqno) and
 * add message. Set e.received_msgs to the new window. Else just add the message.
 */
protected void handleDataReceived(final Address sender, long seqno, short conn_id,  boolean first, final Message msg) {
  ReceiverEntry entry=getReceiverEntry(sender, seqno, first, conn_id);
  if(entry == null)
    return;
  update(entry, 1);
  boolean oob=msg.isFlagSet(Message.Flag.OOB);
  final Table<Message> win=entry.msgs;
  boolean added=win.add(seqno, oob? DUMMY_OOB_MSG : msg); // adding the same dummy OOB msg saves space (we won't remove it)
  if(ack_threshold <= 1)
    sendAck(sender, win.getHighestDeliverable(), entry.connId());
  else
    entry.sendAck(true); // will be sent delayed (on the next xmit_interval)
  // An OOB message is passed up immediately. Later, when remove() is called, we discard it. This affects ordering !
  // http://jira.jboss.com/jira/browse/JGRP-377
  if(oob) {
    if(added)
      deliverMessage(msg, sender, seqno);
    // we don't steal work if the message is internal (https://issues.jboss.org/browse/JGRP-1733)
    if(msg.isFlagSet(Message.Flag.INTERNAL)) {
      processInternalMessage(win, sender);
      return;
    }
  }
  removeAndDeliver(win, sender);
}
org.jgroups.utilTablegetHighestDeliverable

Javadoc

Returns the highest deliverable (= removable) seqno. This may be higher than #getHighestDelivered(), e.g. if elements have been added but not yet removed

Popular methods of Table

  • add
    Adds elements from the list to the table
  • <init>
  • _add
  • _compact
    Moves the contents of matrix down by the number of purged rows and resizes the matrix accordingly. T
  • capacity
    Returns the total capacity in the matrix
  • compact
  • computeIndex
    Computes and returns the index within a row for seqno
  • computeRow
    Computes and returns the row index for seqno. The caller must hold the lock.
  • computeSize
    Iterate from low to hr and add up non-null values. Caller must hold the lock.
  • findHighestSeqno
  • forEach
    Iterates over the matrix with range [from .. to] (including from and to), and calls Visitor#visit(lo
  • get
    Returns an element at seqno
  • forEach,
  • get,
  • getAdders,
  • getDigest,
  • getHighestDelivered,
  • getHighestReceived,
  • getLow,
  • getMissing,
  • getNumCompactions

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • setScale (BigDecimal)
  • Menu (java.awt)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for WebStorm
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