Examples of acquire()


Examples of org.ofbiz.service.semaphore.ServiceSemaphore.acquire()

    public Map<String, Object> runSync(String localName, ModelService modelService, Map<String, ? extends Object> params, boolean validateOut) throws ServiceAuthException, ServiceValidationException, GenericServiceException {
        // check for semaphore and aquire a lock
        ServiceSemaphore lock = null;
        if ("wait".equals(modelService.semaphore) || "fail".equals(modelService.semaphore)) {
            lock = new ServiceSemaphore(delegator, modelService);
            lock.acquire();
        }

        long serviceStartTime = System.currentTimeMillis();
        boolean debugging = checkDebug(modelService, 1, true);
        if (Debug.verboseOn()) {
View Full Code Here

Examples of org.red5.server.api.so.ISharedObject.acquire()

    // create the SO
    assertTrue(app.createSharedObject(room, "mtSO", persistent));
    ISharedObject so = app.getSharedObject(room, "mtSO");
    // acquire only works with non-persistent so's
    if (!persistent) {
      so.acquire();
      assertTrue(so.isAcquired());
    }
    // test runnables represent clients
    trs = new TestRunnable[21];
    for (int t = 0; t < trs.length; t++) {
View Full Code Here

Examples of org.rstudio.core.client.Barrier.acquire()

         {
            eventBus_.fireEvent(new ReloadEvent());
         }
      });
     
      Token token = barrier.acquire();
      try
      {
         eventBus_.fireEvent(new LastChanceSaveEvent(barrier));
      }
      finally
View Full Code Here

Examples of org.sonatype.aether.SyncContext.acquire()

            {
                SyncContext syncContext = syncContextFactory.newInstance( session, true );

                try
                {
                    syncContext.acquire( null, Collections.singleton( metadata ) );

                    if ( metadata.getFile() != null && metadata.getFile().exists() )
                    {
                        fis = new FileInputStream( metadata.getFile() );
                        org.apache.maven.artifact.repository.metadata.Metadata m =
View Full Code Here

Examples of org.tmatesoft.hg.internal.CompleteRepoLock.acquire()

  public Outcome execute() throws HgException, IOException, CancelledException {
    if (message == null) {
      throw new HgBadArgumentException("Shall supply commit message", null);
    }
    final CompleteRepoLock repoLock = new CompleteRepoLock(repo);
    repoLock.acquire();
    try {
      int[] parentRevs = new int[2];
      detectParentFromDirstate(parentRevs);
      HgWorkingCopyStatusCollector sc = new HgWorkingCopyStatusCollector(repo);
      Record status = sc.status(HgRepository.WORKING_COPY);
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRepositoryLock.acquire()

  public void execute(Mediator mediator) throws HgCallbackTargetException, HgRepositoryLockException, HgIOException, HgLibraryFailureException, CancelledException {
    if (firstCset == BAD_REVISION || secondCset == BAD_REVISION || ancestorCset == BAD_REVISION) {
      throw new IllegalArgumentException("Merge heads and their ancestors are not initialized");
    }
    final HgRepositoryLock wdLock = repo.getWorkingDirLock();
    wdLock.acquire();
    try {
      Pool<Nodeid> cacheRevs = new Pool<Nodeid>();
      Pool<Path> cacheFiles = new Pool<Path>();

      Internals implRepo = Internals.getInstance(repo);
View Full Code Here

Examples of org.voltdb.utils.DBBPool.acquire()

        assertTrue(expected <= size);
        b.rewind();

        // Make sure we can still do this with a BufferPool
        DBBPool buffer_pool = new DBBPool(false, false);
        BBContainer bc = buffer_pool.acquire(size);
        error.serializeToBuffer(bc.b);
        bc.b.rewind();
        assertEquals(expected, bc.b.getInt());
        bc.b.rewind();
       
View Full Code Here

Examples of org.wiztools.restclient.IGlobalOptions.acquire()

            ok_type = SECONDS;
        }
        ok_value = reqTimeout;
       
        IGlobalOptions options = Implementation.of(IGlobalOptions.class);
        options.acquire();
        options.setProperty("request-timeout-in-millis", String.valueOf(reqTimeout));
        options.release();
       
        return true;
    }
View Full Code Here

Examples of org.wiztools.restclient.ProxyConfig.acquire()

        String username = jtf_username.getText();
        char[] password = jpf_password.getPassword();
       
        // Setting proxy object
        ProxyConfig proxy = ProxyConfig.getInstance();
        proxy.acquire();
        if(enabled){
            proxy.setEnabled(true);
            proxy.setHost(host);
            proxy.setPort(port);
           
View Full Code Here

Examples of uk.co.mmscomputing.concurrent.Semaphore.acquire()

        jsane.negotiateOptions(this);

        if(showUI){
          Semaphore s=new Semaphore(0,true);
          new SaneAcquirePanel(this,s).display();
          s.acquire();
        }
        ProgressMonitor pm=(showPB)?new ProgressMonitor(name):null;
        setProgressBar(pm);
        setProgressBar("preparing "+name);
        try{
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.