Examples of lock()


Examples of com.cybozu.vmbkp.profile.ProfileAllVm.lock()

        /* Reload the profile to counteract the case where
           another processes wrote the profile
           during the above initialization. */
        try {
            profAllVm.lock(60);
            profAllVm.reload();

        } catch (Exception e) {
            throw e;
           
View Full Code Here

Examples of com.dotmarketing.business.RoleAPI.lock()

    ActivityLogger.logInfo(getClass(), "Locking Role", "Date: " + date + "; " + "User:" + user.getUserId() + "; RoleID: " + role.getId() );
    AdminLogger.log(getClass(), "Locking Role", "Date: " + date + "; " + "User:" + user.getUserId() + "; RoleID: " + role.getId() );

    try {
      roleAPI.lock(role);
    } catch(DotDataException e) {
      ActivityLogger.logInfo(getClass(), "Error Locking Role", "Date: " + date + ";  "+ "User:" + user.getUserId() + "; RoleID: " + role.getId() );
      AdminLogger.log(getClass(), "Error Locking Role", "Date: " + date + ";  "+ "User:" + user.getUserId() + "; RoleID: " + role.getId() );
      throw e;
    }
View Full Code Here

Examples of com.foreach.common.concurrent.locks.distributed.DistributedLock.lock()

    if ( !lock.isHeldByCurrentThread() ) {
      LOG.debug( "Acquiring Across bootstrap lock, owner id: {}", lock.getOwnerId() );

      long lockStartTime = System.currentTimeMillis();
      lock.lock();

      LOG.info( "Across bootstrap lock acquired by {} in {} ms", lock.getOwnerId(),
                System.currentTimeMillis() - lockStartTime );
    }
  }
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.runtime.TokenEntity.lock()

      executionContext.setConnector(connector);

      // execute the action
      // log.debug("executing action '"+action+"'");
      try {
        token.lock();
       
        if(connector.getSkipExpression()!=null&&!connector.getSkipExpression().equals("")){
          Object skipExpressionObj=ExpressionMgmt.execute(connector.getSkipExpression(), executionContext);
          if(StringUtil.getBoolean(skipExpressionObj)){
            return ;
View Full Code Here

Examples of com.hazelcast.concurrent.lock.LockStoreImpl.lock()

    }

    @Override
    public void run() throws Exception {
        LockStoreImpl lockStore = getLockStore();
        lockStore.lock(key, originalCaller, threadId);
        ConditionKey conditionKey = new ConditionKey(namespace.getObjectName(), key, conditionId);
        lockStore.removeSignalKey(conditionKey);
        lockStore.removeAwait(key, conditionId, originalCaller, threadId);
        response = true;
    }
View Full Code Here

Examples of com.hazelcast.core.ILock.lock()

        try {
            String memberAddr = event.getMember().getInetSocketAddress().toString();
            if (endpointOwners.containsKey(memberAddr)) {
                synchronized (shutdownMutex) {
                    ILock lock = hazelcastInstance.getLock("EndpointOwners/" + memberAddr);
                    lock.lock();
                    try {
                        if (endpointOwners.containsKey(memberAddr)) {
                            Collection<String> keys = endpointOwners.remove(memberAddr);
                            for (Object k : keys) {
                                Endpoint endpoint = (Endpoint)endpointMap.remove(k);
View Full Code Here

Examples of com.hazelcast.core.IMap.lock()

        }, 2);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                int key = random.nextInt(SIZE);
                map.lock(key);
                try {
                    Thread.sleep(1);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                } finally {
View Full Code Here

Examples of com.hazelcast.core.MultiMap.lock()

    @Test(expected = NullPointerException.class)
    public void testLock_whenNullKey() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);
        MultiMap multiMap = getMultiMap(factory.newInstances(), randomString());

        multiMap.lock(null);
    }

    @Test(expected = NullPointerException.class)
    public void testUnlock_whenNullKey() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);
View Full Code Here

Examples of com.ibm.as400.access.SequentialFile.lock()

  {
    try
    {
      SequentialFile seqFile = new SequentialFile(as400System,
          lockFilename);
      seqFile.lock(SequentialFile.WRITE_EXCLUSIVE_LOCK);
    } // try
    catch (Exception ex)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

Examples of com.mobixess.jodb.core.io.IOTicket.lock()

        return _activeObjects.size();
    }
   
    public JODBQueryList getAllObjects() throws IOException{
        IOTicket ioTicket = _base.getIOTicket(true, false);
        ioTicket.lock(false);
        long[] offsets;
        try {
            offsets = _base.getForAllObjects(ioTicket);
        } finally {
            ioTicket.unlock();
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.