|
Berkeley DB version 4.3.29 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.collections.StoredCollections
This class consists exclusively of static methods that operate on or return stored collections. It contains methods for changing certain properties of a collection. Because collection properties are immutable, these methods always return a new collection reference. This allows stored collections to be used safely by multiple threads. Note that creating the new collection reference is not expensive and creates only two new objects.
When a collection is created with a particular property, all collections and iterators derived from that collection will inherit the property. For example, if a dirty-read Map is created then calls to subMap(), values(), entrySet(), and keySet() will create dirty-read collections also.
Dirty-Read Methods names beginning with dirtyRead create a new
dirty-read container from a given stored container. When dirty-read is
enabled, data will be read that has been modified by another transaction but
not committed. Using dirty-read can improve concurrency since reading will
not wait for other transactions to complete. For a non-transactional
container (when StoredContainer.isTransactional()
returns false),
dirty-read has no effect. If StoredContainer.isDirtyReadAllowed()
returns false, dirty-read also has no effect. If dirty-ready is enabled
(and allowed) for a container, StoredContainer.isDirtyRead()
will
return true. Dirty-read is disabled by default for a container.
Method Summary | |
static Collection |
dirtyReadCollection(Collection storedCollection)
Creates a dirty-read collection from a given stored collection. |
static List |
dirtyReadList(List storedList)
Creates a dirty-read list from a given stored list. |
static Map |
dirtyReadMap(Map storedMap)
Creates a dirty-read map from a given stored map. |
static Set |
dirtyReadSet(Set storedSet)
Creates a dirty-read set from a given stored set. |
static SortedMap |
dirtyReadSortedMap(SortedMap storedSortedMap)
Creates a dirty-read sorted map from a given stored sorted map. |
static SortedSet |
dirtyReadSortedSet(SortedSet storedSortedSet)
Creates a dirty-read sorted set from a given stored sorted set. |
static Iterator |
iterator(Iterator storedIterator)
Clones a stored iterator preserving its current position. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Collection dirtyReadCollection(Collection storedCollection)
storedCollection
- the base collection.
ClassCastException
- if the given container is not a
StoredContainer.public static List dirtyReadList(List storedList)
storedList
- the base list.
ClassCastException
- if the given container is not a
StoredContainer.public static Map dirtyReadMap(Map storedMap)
storedMap
- the base map.
ClassCastException
- if the given container is not a
StoredContainer.public static Set dirtyReadSet(Set storedSet)
storedSet
- the base set.
ClassCastException
- if the given container is not a
StoredContainer.public static SortedMap dirtyReadSortedMap(SortedMap storedSortedMap)
storedSortedMap
- the base map.
ClassCastException
- if the given container is not a
StoredContainer.public static SortedSet dirtyReadSortedSet(SortedSet storedSortedSet)
storedSortedSet
- the base set.
ClassCastException
- if the given container is not a
StoredContainer.public static Iterator iterator(Iterator storedIterator)
storedIterator
- an iterator to clone.
StoredIterator
having the same position as the
given iterator.
ClassCastException
- if the given iterator is not a
StoredIterator.
|
Berkeley DB version 4.3.29 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |