Package com.cetsoft.imcache.concurrent.lock

Examples of com.cetsoft.imcache.concurrent.lock.StripedReadWriteLock


    if(concurrencyLevel>11||concurrencyLevel<0){
      throw new IllegalArgumentException("ConcurrencyLevel must be between 0 and 11 inclusive!");
    }
    this.serializer = serializer;
    this.bufferStore = byteBufferStore;
    this.readWriteLock = new StripedReadWriteLock(concurrencyLevel);
    ScheduledExecutorService cleanerService = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
      public Thread newThread(Runnable runnable) {
        return new Thread(runnable, "imcache:bufferCleaner(name="+getName()+",thread="+ NO_OF_CLEANERS.incrementAndGet() + ")");
      }
    });
View Full Code Here


   */
  public OffHeapByteBuffer(int index, int capacity, int concurrencyLevel) {
    this.index = index;
    this.capacity = capacity;
    directByteBuffer = new DirectByteBuffer(capacity);
    readWriteLock = new StripedReadWriteLock(concurrencyLevel);
  }
View Full Code Here

   */
  public OffHeapByteBuffer(int index, int capacity, int concurrencyLevel){
    this.index = index;
    this.capacity = capacity;
    directByteBuffer = new DirectByteBuffer(capacity);
    readWriteLock = new StripedReadWriteLock(concurrencyLevel);
  }
View Full Code Here

    if(concurrencyLevel>11||concurrencyLevel<0){
      throw new IllegalArgumentException("ConcurrencyLevel must be between 0 and 11 inclusive!");
    }
    this.serializer = serializer;
    this.bufferStore = byteBufferStore;
    this.readWriteLock = new StripedReadWriteLock(concurrencyLevel);
    ScheduledExecutorService cleanerService = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
      public Thread newThread(Runnable runnable) {
        return new Thread(runnable, "imcache:bufferCleaner("+ NO_OF_CLEANERS.incrementAndGet() + ")");
      }
    });
View Full Code Here

TOP

Related Classes of com.cetsoft.imcache.concurrent.lock.StripedReadWriteLock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.