Class PaddedAtomicLong

  • All Implemented Interfaces:
    java.io.Serializable

    public class PaddedAtomicLong
    extends java.util.concurrent.atomic.AtomicLong
    Copied from http://mechanical-sympathy.blogspot.ch/2011/08/false-sharing-java-7.html. Switch to @Contended once it is available.
    Since:
    4.0
    Author:
    Bela Ban
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      long p1  
      long p2  
      long p3  
      long p4  
      long p5  
      long p6  
      long p7  
    • Constructor Summary

      Constructors 
      Constructor Description
      PaddedAtomicLong​(long initialValue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long sum()  
      • Methods inherited from class java.util.concurrent.atomic.AtomicLong

        accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
      • Methods inherited from class java.lang.Number

        byteValue, shortValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • p1

        public volatile long p1
      • p2

        public volatile long p2
      • p3

        public volatile long p3
      • p4

        public volatile long p4
      • p5

        public volatile long p5
      • p6

        public volatile long p6
      • p7

        public volatile long p7
    • Constructor Detail

      • PaddedAtomicLong

        public PaddedAtomicLong​(long initialValue)
    • Method Detail

      • sum

        public long sum()