Tabnine Logo
Table.stream
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: wildfly/wildfly

/** Dumps the seqnos in the table as a list */
public String dump() {
  lock.lock();
  try {
    return stream(low, hr).filter(Objects::nonNull).map(Object::toString)
     .collect(Collectors.joining(", "));
  }
  finally {
    lock.unlock();
  }
}
origin: wildfly/wildfly

/** Iterate from low to hr and add up non-null values. Caller must hold the lock. */
@GuardedBy("lock")
public int computeSize() {
  return (int)stream().filter(Objects::nonNull).count();
}
origin: wildfly/wildfly

protected static long sizeOfAllMessages(Table<Message> buf, boolean include_headers) {
  return buf.stream().reduce(0L, (size,el) -> {
    if(el == null)
      return size;
    else
      return size + (include_headers? el.size() : el.getLength());
  }, (l,r) -> l);
}
origin: org.jboss.eap/wildfly-client-all

/** Dumps the seqnos in the table as a list */
public String dump() {
  lock.lock();
  try {
    return stream(low, hr).filter(Objects::nonNull).map(Object::toString)
     .collect(Collectors.joining(", "));
  }
  finally {
    lock.unlock();
  }
}
origin: org.jboss.eap/wildfly-client-all

/** Iterate from low to hr and add up non-null values. Caller must hold the lock. */
@GuardedBy("lock")
public int computeSize() {
  return (int)stream().filter(Objects::nonNull).count();
}
origin: org.jboss.eap/wildfly-client-all

protected static long sizeOfAllMessages(Table<Message> buf, boolean include_headers) {
  return buf.stream().reduce(0L, (size,el) -> {
    if(el == null)
      return size;
    else
      return size + (include_headers? el.size() : el.getLength());
  }, (l,r) -> l);
}
org.jgroups.utilTablestream

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,
  • getHighestDeliverable,
  • getHighestDelivered,
  • getHighestReceived,
  • getLow,
  • getMissing,
  • getNumCompactions

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • String (java.lang)
  • Path (java.nio.file)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • CodeWhisperer 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