Examples of ReentrantReadWriteLock


Examples of java.util.concurrent.locks.ReentrantReadWriteLock

  protected int crossCatalogResultSortingThreshold;
 
  public CatalogServiceLocal(CatalogRepository catalogRepository, IngestMapper ingestMapper, File pluginStorageDir, TransactionIdFactory transactionIdFactory, boolean restrictQueryPermissions, boolean restrictIngestPermissions, boolean oneCatalogFailsAllFail, boolean simplifyQueries, boolean disableIntersectingCrossCatalogQueries, int crossCatalogResultSortingThreshold) throws InstantiationException {
    try {
      this.catalogs = new HashSet<Catalog>();
      this.catalogsLock = new ReentrantReadWriteLock();
      this.ingestMapperLock = new ReentrantReadWriteLock();
      this.setPluginStorageDir(pluginStorageDir);
      this.setRestrictQueryPermissions(restrictQueryPermissions);
      this.setRestrictIngestPermissions(restrictIngestPermissions);
      this.setTransactionIdFactory(transactionIdFactory);
      this.setIngestMapper(ingestMapper);
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    private Set<DispatchType> dispatches = new CopyOnWriteArraySet<>();

    public SocketWrapper(E socket) {
        this.socket = socket;
        ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
        this.blockingStatusReadLock = lock.readLock();
        this.blockingStatusWriteLock = lock.writeLock();
    }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

                  boolean restoreBuffer, File mmapSessionDirectory, AssertLevel assertLevel,
                  boolean enabled, ByteOrder byteOrder)
  {
    _enabled = enabled;
    _assertLevel = null != assertLevel ? assertLevel : AssertLevel.NONE;
    rwLock = new ReentrantReadWriteLock();
    maxElements = maxIndexSize/SIZE_OF_SCN_OFFSET_RECORD;
    int proposedBlockSize = (int) (totalAddressedSpace / maxElements);
    if ((1L * proposedBlockSize * maxElements)< totalAddressedSpace)
    {
      proposedBlockSize++;
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

{
  private final ReadWriteLock _readWriteLock;

  protected ReadWriteSyncedObject(boolean threadSafe)
  {
    _readWriteLock = threadSafe ? new ReentrantReadWriteLock(true) : null;
  }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

     * @param v The vector to decorate.
     */
    public AtomicVector(DoubleVector v) {
        vector = v;

        ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock();
        readLock = rwLock.readLock();
        writeLock = rwLock.writeLock();
    }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

     * @param v The vector to decorate.
     */
    public AtomicSparseVector(SparseDoubleVector v) {
        vector = v;

        ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock();
        readLock = rwLock.readLock();
        writeLock = rwLock.writeLock();
    }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    public AtomicGrowingMatrix() {
        this.rows = new AtomicInteger(0);
        this.cols = new AtomicInteger(0);
        sparseMatrix = new IntegerMap<AtomicVector>();
       
        ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock();
        rowReadLock = rwLock.readLock();
        rowWriteLock = rwLock.writeLock();

        rwLock = new ReentrantReadWriteLock();
        denseArrayReadLock = rwLock.readLock();
        denseArrayWriteLock = rwLock.writeLock();
    }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    public AtomicGrowingSparseMatrix() {
        this.rows = new AtomicInteger(0);
        this.cols = new AtomicInteger(0);
        sparseMatrix = new IntegerMap<AtomicSparseVector>();
       
        ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock();
        rowReadLock = rwLock.readLock();
        rowWriteLock = rwLock.writeLock();

        rwLock = new ReentrantReadWriteLock();
        denseArrayReadLock = rwLock.readLock();
        denseArrayWriteLock = rwLock.writeLock();
    }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    Lock readLock = lock.readLock();
    acquireLock( key, timeout, readLock );
  }

  private ReadWriteLock getLock(EntityKey key) {
    ReadWriteLock newLock = new ReentrantReadWriteLock();
    ReadWriteLock previous = dataLocks.putIfAbsent( key, newLock );
    return previous != null ? previous : newLock;
  }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

  public Job()
  {
    jobTasks = new ArrayList<JobTask>();
    threshold = new Threshold(5000);
    trunkLock = new ReentrantReadWriteLock();
    loadLock = new ReentrantLock();
    waitlock = new ReentrantLock();
    waitToJobReset = waitlock.newCondition();
    merged = new AtomicBoolean(false);
        merging = new AtomicBoolean(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.