Tabnine Logo
LongAdder.casBase
Code IndexAdd Tabnine to your IDE (free)

How to use
casBase
method
in
com.google.common.hash.LongAdder

Best Java code snippets using com.google.common.hash.LongAdder.casBase (Showing top 5 results out of 315)

origin: google/guava

/**
 * Adds the given value.
 *
 * @param x the value to add
 */
public void add(long x) {
 Cell[] as;
 long b, v;
 int[] hc;
 Cell a;
 int n;
 if ((as = cells) != null || !casBase(b = base, b + x)) {
  boolean uncontended = true;
  if ((hc = threadHashCode.get()) == null
    || as == null
    || (n = as.length) < 1
    || (a = as[(n - 1) & hc[0]]) == null
    || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
 }
}
origin: google/j2objc

/**
 * Adds the given value.
 *
 * @param x the value to add
 */
public void add(long x) {
 Cell[] as;
 long b, v;
 int[] hc;
 Cell a;
 int n;
 if ((as = cells) != null || !casBase(b = base, b + x)) {
  boolean uncontended = true;
  if ((hc = threadHashCode.get()) == null
    || as == null
    || (n = as.length) < 1
    || (a = as[(n - 1) & hc[0]]) == null
    || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
 }
}
origin: wildfly/wildfly

/**
 * Adds the given value.
 *
 * @param x the value to add
 */
public void add(long x) {
 Cell[] as;
 long b, v;
 int[] hc;
 Cell a;
 int n;
 if ((as = cells) != null || !casBase(b = base, b + x)) {
  boolean uncontended = true;
  if ((hc = threadHashCode.get()) == null
    || as == null
    || (n = as.length) < 1
    || (a = as[(n - 1) & hc[0]]) == null
    || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
 }
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Adds the given value.
 *
 * @param x the value to add
 */
public void add(long x) {
 Cell[] as;
 long b, v;
 int[] hc;
 Cell a;
 int n;
 if ((as = cells) != null || !casBase(b = base, b + x)) {
  boolean uncontended = true;
  if ((hc = threadHashCode.get()) == null
    || as == null
    || (n = as.length) < 1
    || (a = as[(n - 1) & hc[0]]) == null
    || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
 }
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Adds the given value.
 *
 * @param x the value to add
 */
public void add(long x) {
 Cell[] as;
 long b, v;
 int[] hc;
 Cell a;
 int n;
 if ((as = cells) != null || !casBase(b = base, b + x)) {
  boolean uncontended = true;
  if ((hc = threadHashCode.get()) == null
    || as == null
    || (n = as.length) < 1
    || (a = as[(n - 1) & hc[0]]) == null
    || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
 }
}
com.google.common.hashLongAddercasBase

Popular methods of LongAdder

  • <init>
    Creates a new adder with initial sum of zero.
  • add
    Adds the given value.
  • internalReset
  • retryUpdate
  • sum
    Returns the current sum. The returned value is NOT an atomic snapshot; invocation in the absence of

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Kernel (java.awt.image)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top PhpStorm 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