public interface MailboxPathLocker
MailboxPathLocker
is responsible to help to synchronize the
access to a MailboxPath
and execute an given MailboxPathLocker.LockAwareExecution
Implementations that are not able to handle read / write locks in a different way are needed to handle all locks as write lock.Modifier and Type | Interface and Description |
---|---|
static interface |
MailboxPathLocker.LockAwareExecution<T>
Execute code while holding a lock
|
Modifier and Type | Method and Description |
---|---|
<T> T |
executeWithLock(MailboxSession session,
MailboxPath path,
MailboxPathLocker.LockAwareExecution<T> execution)
Deprecated.
use
executeWithLock(MailboxSession, MailboxPath, LockAwareExecution, boolean) with argument true |
<T> T |
executeWithLock(MailboxSession session,
MailboxPath path,
MailboxPathLocker.LockAwareExecution<T> execution,
boolean writeLock)
Execute the
MailboxPathLocker.LockAwareExecution while holding a lock on the
MailboxPath . |
@Deprecated <T> T executeWithLock(MailboxSession session, MailboxPath path, MailboxPathLocker.LockAwareExecution<T> execution) throws MailboxException
executeWithLock(MailboxSession, MailboxPath, LockAwareExecution, boolean)
with argument true
MailboxException
<T> T executeWithLock(MailboxSession session, MailboxPath path, MailboxPathLocker.LockAwareExecution<T> execution, boolean writeLock) throws MailboxException
MailboxPathLocker.LockAwareExecution
while holding a lock on the
MailboxPath
. If writeLock is true the implementation need to make sure that no other threads can read and write while the lock
is hold. The contract is the same as documented in ReadWriteLock
.session
- path
- execution
- writeLock
- MailboxException
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.