Examples of lock()


Examples of com.netflix.exhibitor.core.config.PseudoLock.lock()

        try
        {
            PseudoLock  lock = context.getExhibitor().getConfigManager().newConfigBasedLock();
            try
            {
                if ( lock.lock(context.getExhibitor().getLog(), 10, TimeUnit.SECONDS) )  // TODO consider making configurable in the future
                {
                    if ( context.getExhibitor().getConfigManager().startRollingConfig(wrapped, null) )
                    {
                        result = new Result("OK", true);
                    }
View Full Code Here

Examples of com.orientechnologies.orient.core.record.ORecord.lock()

        if (record.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
          record.reload();

        if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_SHARED_LOCK)
          record.lock(false);
        else if (iLockingStrategy == OStorage.LOCKING_STRATEGY.KEEP_EXCLUSIVE_LOCK)
          record.lock(true);

        callbackHooks(TYPE.AFTER_READ, record);
        return (RET) record;
View Full Code Here

Examples of com.persistit.Exchange.lock()

        Exchange ex = schemaTreeExchange(session);
        try {
            ex.clear().append(S_K_ONLINE).append(onlineSession.id).append(S_K_ERROR);
            ex.fetch();
            // write skew
            ex.lock();
            return ex.getValue().isDefined() ? ex.getValue().getString() : null;
        } catch(PersistitException | RollbackException e) {
            if(ex != null) {
                treeService.releaseExchange(session, ex);
            }
View Full Code Here

Examples of com.saasovation.common.port.adapter.persistence.leveldb.LevelDBUnitOfWork.lock()

    public void remove(Sprint aSprint) {
        LevelDBKey lockKey = new LevelDBKey(PRIMARY, aSprint.tenantId().id());

        LevelDBUnitOfWork uow = LevelDBUnitOfWork.current();

        uow.lock(lockKey.key());

        this.remove(aSprint, uow);
    }

    @Override
View Full Code Here

Examples of com.shop.util.chunked.ChunkedByteArray.lock()

                  }
                  entry.address = CCDB2IndexEntry.NOT_EXISTS_ADDRESS;
                }
                else
                {
                  data.lock();
                  entry.bytesRef = new SoftReference<ChunkedByteArray>(data);

                  fFromDiskGetQty.incrementAndGet();
                }
              }
View Full Code Here

Examples of com.sleepycat.je.txn.Locker.lock()

        /*
         * Write lock instead of read lock to avoid upgrade issues.
         * There's a good chance that we'll need it for write
         * anyway.
         */
        currentLock = locker.lock
                        (currentLN.getNodeId(), LockType.WRITE, database);
        bin = cursor.latchBIN();
        duplicateEntryIndex = cursor.getIndex();
        n = bin.fetchTarget(duplicateEntryIndex);
        if (n == null) {
View Full Code Here

Examples of com.sleepycat.je.txn.Txn.lock()

         * We're reconstructing a prepared, but not
         * finished, transaction.  We know that there
         * was a write lock on this LN since it exists
         * in the log under this txnId.
         */
        preparedTxn.lock(ln.getNodeId(),
             LockType.WRITE,
             db);
        preparedTxn.setPrepared(true);
          }

View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.PacketReference.lock()

                        // ok allow overrun
                        boolean el = d.destMessages.getEnforceLimits();

                        d.destMessages.enforceLimits(false);

                        pr.lock();
                        d.putMessage(pr, AddReason.LOADED, true);
                        // turn off overrun
                        d.destMessages.enforceLimits(el);
                    } catch (IllegalStateException ex) {
                        // thats ok, we already exists
View Full Code Here

Examples of com.taobao.datasource.tm.TransactionLocal.lock()

                return cl;
            }

            // Track by transaction
            try {
                trackByTx.lock(trackByTransaction);
            } catch (Throwable t) {
                JBossResourceException.rethrowAsResourceException("Unable to get connection from the pool for tx="
                        + trackByTransaction, t);
            }
            try {
View Full Code Here

Examples of com.twitter.common.zookeeper.DistributedLock.lock()

    public void lock(String lockPath) {
        assert mLocks.get(lockPath) == null: "mLocks.get(" + lockPath + ") == null";
        DistributedLock distributedLock = new DistributedLockImpl(mZookeeperClient, lockPath);
        mLocks.put(lockPath, distributedLock);
        distributedLock.lock();
    }

    public void unlock(String lockPath) {
        DistributedLock distributedLock = mLocks.get(lockPath);
        assert distributedLock != null: "mLocks.get(" + lockPath + ") != null";
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.