|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.state.DefaultISMLocking
public class DefaultISMLocking
Default item state locking strategy. The default strategy is simply to use a single coarse-grained read-write lock over the entire workspace.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.jackrabbit.core.state.ISMLocking |
---|
ISMLocking.ReadLock, ISMLocking.WriteLock |
Constructor Summary | |
---|---|
DefaultISMLocking()
|
Method Summary | |
---|---|
ISMLocking.ReadLock |
acquireReadLock(ItemId id)
Increments the reader count and returns the acquired read lock once there are no more writers or the current writer shares the thread id with this reader. |
ISMLocking.WriteLock |
acquireWriteLock(ChangeLog changeLog)
Increments the writer count, sets the writer identifier and returns the acquired write lock once there are no other active readers or writers or the current writer shares the thread id with this writer. |
boolean |
isWriterPreference()
Returns the writer preference status of this locking strategy. |
void |
setWriterPreference(boolean preference)
Sets the writer preference status of this locking strategy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultISMLocking()
Method Detail |
---|
public boolean isWriterPreference()
public void setWriterPreference(boolean preference)
preference
- writer preferencepublic ISMLocking.ReadLock acquireReadLock(ItemId id) throws InterruptedException
acquireReadLock
in interface ISMLocking
id
- an item id.
InterruptedException
public ISMLocking.WriteLock acquireWriteLock(ChangeLog changeLog) throws InterruptedException
acquireWriteLock
in interface ISMLocking
changeLog
- the change log
changeLog
.
InterruptedException
- if the thread is interrupted while creating
the write lock.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |