Package org.eclipse.jface.text
Interface ISynchronizable
-
- All Known Subinterfaces:
IAnnotationMap
- All Known Implementing Classes:
AbstractMarkerAnnotationModel,AnnotationModel,ProjectionAnnotationModel,ResourceMarkerAnnotationModel
public interface ISynchronizableInterface for text related objects which may be used in the multi-threaded context and thus must provide a way to prevent concurrent access and manipulation.In order to reduce the probability of dead locks clients should synchronize their access to these objects by using the provided lock object rather than the object itself.
Managing objects can use the
setLockObjectmethod in order to synchronize whole sets of objects.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetLockObject()Returns the lock object ornullif there is none.voidsetLockObject(Object lockObject)Sets the lock object for this object.
-
-
-
Method Detail
-
setLockObject
void setLockObject(Object lockObject)
Sets the lock object for this object. If the lock object is notnullsubsequent calls to specified methods of this object are synchronized on this lock object. Which methods are synchronized is specified by the implementer.You should not override an existing lock object unless you own that lock object yourself. Use the existing lock object instead.
- Parameters:
lockObject- the lock object. May benull.
-
getLockObject
Object getLockObject()
Returns the lock object ornullif there is none. Clients should use the lock object in order to synchronize concurrent access to the implementer.- Returns:
- the lock object or
null
-
-