Package com.adito.vfs.webdav

Examples of com.adito.vfs.webdav.LockedException


        Collection<Lock> locks = locksByHandle_.get(handle);
        if (exclusive && exclusiveLocks_.containsKey(key)) {
            ExclusiveLock lock = exclusiveLocks_.get(key);
            if (!lock.isLockOwner(session))
                throw new LockedException("File is currently locked exclusively by session " + lock.getSession());
        } else if (nonExclusiveLocks_.containsKey(key)) {
            NonExclusiveLock lock = nonExclusiveLocks_.get(key);
            if (exclusive && !lock.isLockOwner(session))
                throw new LockedException("Cannot lock file exclusivley; there are currently " + lock.getSessions().size()
                                + " sessions using it non-exclusivley");
            lock.incrementLock(session);
        } else if (exclusive) {
            ExclusiveLock lock = new ExclusiveLock(resource, session, handle);
            exclusiveLocks_.put(key, lock);
View Full Code Here

TOP

Related Classes of com.adito.vfs.webdav.LockedException

Copyright © 2018 www.massapicom. 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.