|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LockingIterator<T extends EntityView>
This interface defines a locking iterator, i.e. an iterator that will lock the entities returned. Different implementations use different locking strategies.
Clients are responsible for unlocking the entities returned from this
iterator, either by calling unlock(EntityView)
for each entity, or
unlockAll()
after iterating. (Or a combination of the two.)
EntityFS iterators are not thread safe. Don't use them concurrently from several threads without synchronizing access to them.
Method Summary | |
---|---|
void |
unlock(T ent)
Unlock the entity. |
void |
unlockAll()
Unlock all entities that this iterator locked. |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Method Detail |
---|
void unlock(T ent) throws EntityNotFoundException
ent
- The entity.
EntityNotFoundException
- If the iterator does not have a lock for
the entity.void unlockAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |