Examples of LockManager


Examples of javax.jcr.lock.LockManager

     * {@inheritDoc}
     */
    public boolean isLocked() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.isLocked(getPath());
    }
View Full Code Here

Examples of javax.jcr.lock.LockManager

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

Examples of javax.jcr.lock.LockManager

    public Lock getLock()
            throws UnsupportedRepositoryOperationException, LockException,
            AccessDeniedException, RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.getLock(getPath());
    }
View Full Code Here

Examples of javax.jcr.lock.LockManager

            throws UnsupportedRepositoryOperationException, LockException,
            AccessDeniedException, InvalidItemStateException,
            RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        lockMgr.unlock(getPath());
    }
View Full Code Here

Examples of javax.jcr.lock.LockManager

     * {@inheritDoc}
     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.holdsLock(getPath());
    }
View Full Code Here

Examples of javax.jcr.lock.LockManager

     * {@inheritDoc}
     */
    public boolean isLocked() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.isLocked(getPath());
    }
View Full Code Here

Examples of net.sf.hajdbc.lock.LockManager

   
    List<Lock> lockList = new ArrayList<Lock>(identifierSet.size());
   
    if (!identifierSet.isEmpty())
    {
      LockManager lockManager = cluster.getLockManager();
     
      for (String identifier: identifierSet)
      {
        lockList.add(lockManager.writeLock(identifier));
      }
    }
   
    return lockList;
  }
View Full Code Here

Examples of org.apache.geronimo.datastore.impl.LockManager

        File root = new File(System.getProperty("java.io.tmpdir"),
            "GFileManager");
        Util.recursiveDelete(root);
        root.mkdir();
       
        LockManager lockManager = new LockManager();

        InetAddress address = InetAddress.getLocalHost();
        final NodeInfo nodeInfo1 = new NodeInfo("Node1", address, 8080);
        final NodeInfo nodeInfo2 = new NodeInfo("Node2", address, 8082);
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.lock.LockManager

            throws UnsupportedRepositoryOperationException, LockException,
            AccessDeniedException, InvalidItemStateException,
            RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = ((WorkspaceImpl) session.getWorkspace()).getLockManager();
        return lockMgr.lock(getPath(), isDeep, isSessionScoped, Long.MAX_VALUE, null);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.lock.LockManager

            throw new InvalidItemStateException(msg);
        }

        checkLockable();

        LockManager lockMgr = session.getLockManager();
        synchronized (lockMgr) {
            Lock lock = lockMgr.lock(this, isDeep, isSessionScoped);

            boolean succeeded = false;

            try {
                // add properties to content
                internalSetProperty(QName.JCR_LOCKOWNER,
                        InternalValue.create(getSession().getUserID()));
                internalSetProperty(QName.JCR_LOCKISDEEP,
                        InternalValue.create(isDeep));
                save();
                succeeded = true;
            } finally {
                if (!succeeded) {
                    // failed to set lock meta-data content, cleanup
                    try {
                        lockMgr.unlock(this);
                        refresh(false);
                    } catch (RepositoryException re) {
                        // cleanup failed
                        log.error("error while cleaning up after failed lock attempt", re);
                    }
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.