|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - public interface HGSortedSet<E>
A variation of the standard SortedSet interface that offers a
HGRandomAccessResult of its elements in addition to an
Iterator. Also, implementations of this interface are guarantueed
to be thread-safe. This guarantee has a little twist: if you call iterator,
the Iterator returned is not going to be thread-safe and concurrency issues
may arise if the set if being modified while the iterator is still in use. However,
if you call getSearchResult (note that HGRandomAccessResult
extends the Iterator interface), the resulting object will hold
a read lock on the set until its close is invoked. This means that any
thread trying to modify the set while there's an active search result on it will
block, and this includes the thread that opened the search result.
| Method Summary | |
|---|---|
HGRandomAccessResult<E> |
getSearchResult()
|
| Methods inherited from interface java.util.SortedSet |
|---|
comparator, first, headSet, last, subSet, tailSet |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
|---|
HGRandomAccessResult<E> getSearchResult()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||