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

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

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

origin: wildfly/wildfly

/** Moves rows down the matrix, by removing purged rows. If resizing to accommodate seqno is still needed, computes
 * a new size. Then either moves existing rows down, or copies them into a new array (if resizing took place).
 * The lock must be held by the caller of resize(). */
@SuppressWarnings("unchecked")
@GuardedBy("lock")
protected void resize(long seqno) {
  int num_rows_to_purge=computeRow(low);
  int row_index=computeRow(seqno) - num_rows_to_purge;
  if(row_index < 0)
    return;
  int new_size=Math.max(row_index +1, matrix.length);
  if(new_size > matrix.length) {
    T[][] new_matrix=(T[][])new Object[new_size][];
    System.arraycopy(matrix, num_rows_to_purge, new_matrix, 0, matrix.length - num_rows_to_purge);
    matrix=new_matrix;
    num_resizes++;
  }
  else if(num_rows_to_purge > 0) {
    move(num_rows_to_purge);
  }
  offset+=(num_rows_to_purge * elements_per_row);
}
origin: org.jboss.eap/wildfly-client-all

/** Moves rows down the matrix, by removing purged rows. If resizing to accommodate seqno is still needed, computes
 * a new size. Then either moves existing rows down, or copies them into a new array (if resizing took place).
 * The lock must be held by the caller of resize(). */
@SuppressWarnings("unchecked")
@GuardedBy("lock")
protected void resize(long seqno) {
  int num_rows_to_purge=computeRow(low);
  int row_index=computeRow(seqno) - num_rows_to_purge;
  if(row_index < 0)
    return;
  int new_size=Math.max(row_index +1, matrix.length);
  if(new_size > matrix.length) {
    T[][] new_matrix=(T[][])new Object[new_size][];
    System.arraycopy(matrix, num_rows_to_purge, new_matrix, 0, matrix.length - num_rows_to_purge);
    matrix=new_matrix;
    num_resizes++;
  }
  else if(num_rows_to_purge > 0) {
    move(num_rows_to_purge);
  }
  offset+=(num_rows_to_purge * elements_per_row);
}
org.jgroups.utilTablemove

Javadoc

Moves contents of matrix num_rows down. Avoids a System.arraycopy(). Caller must hold the lock.

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

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • String (java.lang)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JLabel (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 15 Vim Plugins
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