Package com.sleepycat.je.latch

Examples of com.sleepycat.je.latch.Latch


     */
    Locker getWriteOwnerLocker(Long nodeId)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return getWriteOwnerLockerInternal(nodeId, lockTableIndex);
        } finally {
            latch.release();
        }
    }
View Full Code Here


                                        boolean flushFromWaiters,
          MemoryBudget mb)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return validateOwnershipInternal
    (nodeId, locker, type, flushFromWaiters, mb, lockTableIndex);
        } finally {
            latch.release();
        }
    }
View Full Code Here

    /**
     * Creates a new handle but does not initialize it.  The init method must
     * be called before using the handle to access the file.
     */
    FileHandle(long fileNum, String label) {
        fileLatch = new Latch("file_" + label + "_fileHandle");
        this.fileNum = fileNum;
    }
View Full Code Here

        /* See if we're configured to do a checksum when reading in objects. */
        doChecksumOnRead =
            configManager.getBoolean(EnvironmentParams.LOG_CHECKSUM_READ);

        logWriteLatch = new Latch(DEBUG_NAME);
        readBufferSize =
            configManager.getInt(EnvironmentParams.LOG_FAULT_READ_SIZE);

        /* Do the stats definitions. */
        stats = new StatGroup(GROUP_NAME, GROUP_DESC);
View Full Code Here

                }
            }

            /* Cache of files. */
            fileCache = new FileCache(configManager);
            fileCacheLatch = new Latch(DEBUG_NAME + "_fileCache");

            /* Start out as if no log existed. */
            currentFileNum = 0L;
            nextAvailableLsn =
                DbLsn.makeLsn(currentFileNum, firstLogEntryOffset());
View Full Code Here

    FSyncManager(EnvironmentImpl envImpl) {
        timeout = envImpl.getConfigManager().getDuration
            (EnvironmentParams.LOG_FSYNC_TIMEOUT);
        this.envImpl = envImpl;

        fsyncLatch = new Latch("fsyncLatch");
        fsyncInProgress = false;
        nextFSyncWaiters = new FSyncGroup(timeout, envImpl);

        stats = new StatGroup(LogStatDefinition.FSYNCMGR_GROUP_NAME,
                              LogStatDefinition.FSYNCMGR_GROUP_DESC);
View Full Code Here

    LogBuffer(int capacity, EnvironmentImpl env)
        throws DatabaseException {

        buffer = ByteBuffer.allocate(capacity);
        readLatch = new Latch(DEBUG_NAME);
        reinit();
    }
View Full Code Here

                  EnvironmentImpl envImpl)
        throws DatabaseException {

        this.fileManager = fileManager;
        this.envImpl = envImpl;
        bufferPoolLatch = new Latch(DEBUG_NAME + "_FullLatch");

        /* Configure the pool. */
        DbConfigManager configManager = envImpl.getConfigManager();
        runInMemory = envImpl.isMemOnly();
        reset(configManager);
View Full Code Here

    /**
     * constructor helper
     */
    private void init(DatabaseImpl database) {
        rootLatch =
            new Latch("RootLatch",
                      (database != null) ? database.getDbEnvironment() : null);
        treeStats = new TreeStats();
        this.root = null;
        this.database = database;
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.latch.Latch

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.