Examples of lock()


Examples of edu.vt.rt.hyflow.benchmark.rmi.list.INode.lock()

    String lastId = null;
    try{
      tailServer = (Address) Network.getAddress(Benchmark.getServerId(TAIL));
      tail = (INode)LocateRegistry.getRegistry(tailServer.inetAddress.getHostAddress(), tailServer.port).lookup(TAIL);
      Network.linkDelay(true, tailServer);
      tail.lock();
      Network.linkDelay(true, tailServer);
      lastId = tail.getNext();    //Got Id for last node in queue
     
      lastServer = (Address) Network.getAddress(Benchmark.getServerId(lastId));
      last = (INode)LocateRegistry.getRegistry(lastServer.inetAddress.getHostAddress(), lastServer.port).lookup(lastId);
View Full Code Here

Examples of er.extensions.eof.ERXEC.lock()

  public void testDB2CreateSchema() {
    //    ERXTestUtilities.fixModelsForAdaptorNamed(adaptorName);


    ERXEC ec = (ERXEC) ERXEC.newEditingContext();
    ec.lock();
    try {
      ERXEOAccessUtilities.ChannelAction action = new ERXEOAccessUtilities.ChannelAction() {
        @Override
        protected int doPerform(EOAdaptorChannel channel) {
          try {
View Full Code Here

Examples of etch.bindings.java.msg.Type.lock()

  public void getField_locked() throws Exception
  {
    Type type = new Type( "blah" );
    assertNotNull( type.getField( "a" ) );
    assertNotNull( type.getField( "b" ) );
    type.lock();
    assertNotNull( type.getField( "a" ) );
    assertNotNull( type.getField( "b" ) );
    assertNull( type.getField( "x" ) );
    assertNull( type.getField( "y" ) );
  }
View Full Code Here

Examples of java.nio.channels.FileChannel.lock()

                case LOCK_EX:
                    if (currentLock != null) {
                        currentLock.release();
                        currentLock = null;
                    }
                    currentLock = fileChannel.lock();
                    if (currentLock != null) {
                        return RubyFixnum.zero(context.getRuntime());
                    }

                    break;
View Full Code Here

Examples of java.util.concurrent.locks.Lock.lock()

    public Endpoint getNextEndpoint(MessageContext synapseMessageContext,
                                    AlgorithmContext algorithmContext) {

        Lock readLock = lock.readLock();
        readLock.lock();
        try {
            if (!isThreadLocal) {
                synchronized (this) {
                    EndpointState state = endpointStates[endpointCursor];
                    if (state.getCurrentWeight() == 0) {
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.lock()

         * {@inheritDoc}
         */
        @Override
        public int getNumIdle() {
            ReadLock readLock = readWriteLock.readLock();
            readLock.lock();
            try {
                return pool.getNumIdle();
            } finally {
                readLock.unlock();
            }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.lock()

         */
        @Override
        public T borrowObject() throws Exception, NoSuchElementException,
                IllegalStateException {
            WriteLock writeLock = readWriteLock.writeLock();
            writeLock.lock();
            try {
                return pool.borrowObject();
            } finally {
                writeLock.unlock();
            }
View Full Code Here

Examples of javax.jcr.Node.lock()

            throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, InvalidItemStateException, RepositoryException {
        final SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
        return (LockInfo) executeWithLocalEvents(new Callable() {
            public Object run() throws RepositoryException {
                Node n = getNode(nodeId, sInfo);
                Lock lock = n.lock(deep, sessionScoped);
                return LockInfoImpl.createLockInfo(lock, idFactory);
            }
        }, sInfo);
    }
View Full Code Here

Examples of javax.jcr.lock.LockManager.lock()

            AccessDeniedException, InvalidItemStateException,
            RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.lock(getPath(), isDeep, isSessionScoped, Long.MAX_VALUE, null);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.persistence.EntityManager.lock()

  public void lock(Object entity, LockModeType lockMode)
  {
    EntityManager em = getCurrent();
   
    if (em != null) {
      em.lock(entity, lockMode);
      return;
    }
   
    em = createEntityManager();
   
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.