Package one.nio.lock

Class PaddedRWLock

  • All Implemented Interfaces:
    java.io.Serializable

    public class PaddedRWLock
    extends RWLock
    Version of RWLock with cache line padding to prevent false sharing.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

        java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long p1  
      private long p10  
      private long p11  
      private long p12  
      private long p13  
      private long p2  
      private long p3  
      private long p4  
      private long p5  
      private long p6  
      private long p7  
      private long p8  
      private long p9  
    • Constructor Summary

      Constructors 
      Constructor Description
      PaddedRWLock()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long preventOptimization()  
      • Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

        acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, toString, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryRelease
      • Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer

        getExclusiveOwnerThread, setExclusiveOwnerThread
      • Methods inherited from class java.lang.Object

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

      • p1

        private volatile long p1
      • p2

        private volatile long p2
      • p3

        private volatile long p3
      • p4

        private volatile long p4
      • p5

        private volatile long p5
      • p6

        private volatile long p6
      • p7

        private volatile long p7
      • p8

        private volatile long p8
      • p9

        private volatile long p9
      • p10

        private volatile long p10
      • p11

        private volatile long p11
      • p12

        private volatile long p12
      • p13

        private volatile long p13
    • Constructor Detail

      • PaddedRWLock

        public PaddedRWLock()
    • Method Detail

      • preventOptimization

        public long preventOptimization()