protected class XtextDocument.XtextDocumentLocker extends java.lang.Object implements IXtextDocumentContentObserver.Processor
Modifier | Constructor and Description |
---|---|
protected |
XtextDocument.XtextDocumentLocker() |
Modifier and Type | Method and Description |
---|---|
protected int |
getReadHoldCount()
Queries the number of reentrant read holds on this lock by the current thread.
|
protected XtextResource |
getState() |
protected int |
getWriteHoldCount()
Queries the number of reentrant write holds on this lock by the current thread.
|
protected <T> T |
internalReadOnly(IUnitOfWork<T,XtextResource> work,
boolean isCancelReaders) |
<T> T |
modify(IUnitOfWork<T,XtextResource> work) |
<T> T |
priorityReadOnly(IUnitOfWork<T,XtextResource> work) |
<T> T |
process(IUnitOfWork<T,XtextResource> transaction)
Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction
again.
|
<T> T |
readOnly(IUnitOfWork<T,XtextResource> work) |
public <T> T process(IUnitOfWork<T,XtextResource> transaction)
process
in interface IXtextDocumentContentObserver.Processor
protected int getWriteHoldCount()
ReentrantReadWriteLock.getWriteHoldCount()
.protected int getReadHoldCount()
ReentrantReadWriteLock
as well, but not before version 1.6. This is
why we have to find our own way to work around it.protected XtextResource getState()
public <T> T modify(IUnitOfWork<T,XtextResource> work)
public <T> T priorityReadOnly(IUnitOfWork<T,XtextResource> work)
public <T> T readOnly(IUnitOfWork<T,XtextResource> work)
protected <T> T internalReadOnly(IUnitOfWork<T,XtextResource> work, boolean isCancelReaders)