Examples of lock()


Examples of ae.sun.java2d.pipe.RenderQueue.lock()

                    rq = bc.getRenderQueue();
                }
            }
        }
        if (rq != null) {
            rq.lock();
            try {
                rq.flushAndInvokeNow(new Runnable() {
                    public void run() {
                        doDispose(disposer);
                    }
View Full Code Here

Examples of cc.mallet.types.Instance.lock()

          trainingSet2.add(inst, 1.0);
        else {
          Instance inst2 = inst.shallowCopy();
          inst2.unLock();
          inst2.setLabeling(c.classify(inst).getLabeling());
          inst2.lock();
          trainingSet2.add(inst2, unlabeledDataWeight);
        }
      }
      c = (NaiveBayes) nbTrainer.newClassifierTrainer().train (trainingSet2);
      logLikelihood = c.dataLogLikelihood (trainingSet2);
View Full Code Here

Examples of cli.System.IO.FileStream.Lock()

                {
                    try
                    {
                        if (false) throw new cli.System.IO.IOException();
                        if (false) throw new cli.System.ObjectDisposedException("");
                        fs.Lock(pos, size);
                        return shared ? RET_EX_LOCK : LOCKED;
                    }
                    catch (cli.System.IO.IOException x)
                    {
                        if (!blocking)
View Full Code Here

Examples of co.paralleluniverse.strands.concurrent.ReentrantLock.lock()

                @Override
                public void received(Cache cache, long id, long version, ByteBuffer data) {
                    if (data != null && data.remaining() > 0) {
                        LOG.debug("Received root {} ({})", rootName, Long.toHexString(id));
                        lck0.lock();
                        try {
                            cond.signalAll();
                        } finally {
                            lck0.unlock();
                        }
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.zookeeper.lock.DistributedLock.lock()

            nodes[i] = node;
            exeucotr.submit(new Runnable() {

                public void run() {
                    try {
                        node.lock();
                        Thread.sleep(100 + RandomUtils.nextInt(100));
                        System.out.println("id: " + node.getId() + " is leader: " + node.isOwner());
                    } catch (InterruptedException e) {
                        want.fail();
                    } catch (KeeperException e) {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.zookeeper.lock.DistributedReentrantLock.lock()

            exeucotr.submit(new Runnable() {

                public void run() {
                    try {
                        Thread.sleep(1000);
                        lock.lock();
                        Thread.sleep(100 + RandomUtils.nextInt(100));

                        System.out.println("id: " + lock.getId() + " is leader: " + lock.isOwner());
                    } catch (InterruptedException e) {
                        want.fail();
View Full Code Here

Examples of com.aragost.javahg.Repository.lock()

    }

    public Changeset commit() {
        Repository repo = getRepository();
        if (this.rollbackChangeset == null) {
            repo.lock();
            try {
                boolean createdNewChangeset = ((GraftCommand) getCommand()).executeContinue();
                return createdNewChangeset ? repo.tip() : null;
            } finally {
                repo.unlock();
View Full Code Here

Examples of com.arjuna.ats.arjuna.utils.FileLock.lock()

    protected synchronized boolean lock (File fd, int lmode, boolean create)
    {
  FileLock fileLock = new FileLock(fd);

  return fileLock.lock(lmode, create);
    }

    /**
     * Unlock the file in the object store.
     */
 
View Full Code Here

Examples of com.cloud.utils.db.GlobalLock.lock()

    @Override
    public void check() {
        GlobalLock lock = GlobalLock.getInternLock("DatabaseUpgrade");
        try {
            s_logger.info("Grabbing lock to check for database upgrade.");
            if (!lock.lock(20 * 60)) {
                throw new CloudRuntimeException("Unable to acquire lock to check for database integrity.");
            }

            try {
                String dbVersion = _dao.getCurrentVersion();
View Full Code Here

Examples of com.cybozu.vmbkp.control.VmArchiveManager.lock()

            boolean ret = false;
            try {
                int timeoutSec = 60;
                if (backupInfo.isDryRun) {timeoutSec = 0;}
               
                vmArcMgr.lock(timeoutSec);
                vmArcMgr.reload();
                ret = backupVm(vmm, vmArcMgr, backupInfo);
               
            } catch (Exception e) {
                logException
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.