Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

com::sleepycat::collections::StoredContainer Class Reference

Inheritance diagram for com::sleepycat::collections::StoredContainer:

com::sleepycat::collections::StoredCollection com::sleepycat::collections::StoredMap com::sleepycat::collections::StoredEntrySet com::sleepycat::collections::StoredKeySet com::sleepycat::collections::StoredList com::sleepycat::collections::StoredValueSet com::sleepycat::collections::StoredSortedMap com::sleepycat::collections::StoredSortedEntrySet com::sleepycat::collections::StoredSortedKeySet com::sleepycat::collections::StoredSortedValueSet

Public Member Functions

final boolean isWriteAllowed ()
final CursorConfig getCursorConfig ()
final boolean isDirtyReadAllowed ()
final boolean isDirtyRead ()
final boolean isTransactional ()
final boolean areDuplicatesAllowed ()
final boolean areDuplicatesOrdered ()
final boolean areKeysRenumbered ()
final boolean isOrdered ()
final boolean isSecondary ()
int size ()
boolean isEmpty ()
void clear ()

Package Functions

final StoredContainer configuredClone (CursorConfig config)
void initAfterClone ()

Detailed Description

A abstract base class for all stored collections and maps. This class provides implementations of methods that are common to the java.util.Collection and the java.util.Map interfaces, namely clear, isEmpty and size.

Note that this class does not conform to the standard Java collections interface in the following ways:

In addition, this class provides the following methods for stored collections only. Note that the use of these methods is not compatible with the standard Java collections interface.

Author:
Mark Hayes

Definition at line 51 of file StoredContainer.java.


Member Function Documentation

final boolean com::sleepycat::collections::StoredContainer::areDuplicatesAllowed  )  [inline]
 

Returns whether duplicate keys are allowed in this container. Duplicates are optionally allowed for HASH and BTREE databases. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Note that the JE product only supports BTREE databases.

Returns:
whether duplicates are allowed.

Definition at line 165 of file StoredContainer.java.

References com::sleepycat::collections::DataView::dupsAllowed.

final boolean com::sleepycat::collections::StoredContainer::areDuplicatesOrdered  )  [inline]
 

Returns whether duplicate keys are allowed and sorted by element value. Duplicates are optionally sorted for HASH and BTREE databases. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Note that the JE product only supports BTREE databases, and duplicates are always sorted.

Returns:
whether duplicates are ordered.

Definition at line 181 of file StoredContainer.java.

References com::sleepycat::collections::DataView::dupsOrdered.

final boolean com::sleepycat::collections::StoredContainer::areKeysRenumbered  )  [inline]
 

Returns whether keys are renumbered when insertions and deletions occur. Keys are optionally renumbered for RECNO databases. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Note that the JE product does not support RECNO databases, and therefore keys are never renumbered.

Returns:
whether keys are renumbered.

Definition at line 197 of file StoredContainer.java.

References com::sleepycat::collections::DataView::keysRenumbered.

void com::sleepycat::collections::StoredContainer::clear  )  [inline]
 

Removes all mappings or elements from this map or collection (optional operation). This method conforms to the java.util.Collection#clear and java.util.Map#clear interfaces.

Exceptions:
UnsupportedOperationException if the container is read-only.
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 275 of file StoredContainer.java.

References com::sleepycat::collections::DataView::clear().

final StoredContainer com::sleepycat::collections::StoredContainer::configuredClone CursorConfig  config  )  [inline, package]
 

Clones a container with a specified cursor configuration.

Definition at line 139 of file StoredContainer.java.

References com::sleepycat::collections::DataView::configuredView(), initAfterClone(), and view.

final CursorConfig com::sleepycat::collections::StoredContainer::getCursorConfig  )  [inline]
 

Returns the cursor configuration that is used for all operations performed via this container. For example, if CursorConfig.getReadUncommitted returns true, data will be read that is modified but not committed. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Returns:
the cursor configuration, or null if no configuration has been specified.

Definition at line 84 of file StoredContainer.java.

References com::sleepycat::collections::DataView::cursorConfig.

void com::sleepycat::collections::StoredContainer::initAfterClone  )  [inline, package]
 

Override this method to initialize view-dependent fields.

Reimplemented in com::sleepycat::collections::StoredMap.

Definition at line 152 of file StoredContainer.java.

Referenced by configuredClone().

final boolean com::sleepycat::collections::StoredContainer::isDirtyRead  )  [inline]
 

Deprecated:
This method has been replaced by getCursorConfig. CursorConfig.isReadUncommitted may be called to determine whether dirty-read is enabled.

Definition at line 115 of file StoredContainer.java.

References com::sleepycat::collections::DataView::cursorConfig.

final boolean com::sleepycat::collections::StoredContainer::isDirtyReadAllowed  )  [inline]
 

Returns whether read-uncommitted is allowed for this container. For the JE product, read-uncommitted is always allowed; for the DB product, read-uncommitted is allowed if it was configured for the underlying database for this container. Even when read-uncommitted is allowed it must specifically be enabled by calling one of the StoredCollections methods. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Returns:
whether read-uncommitted is allowed.
Deprecated:
This method is deprecated with no replacement in this class. In the DB product, DatabaseConfig.getReadUncommitted may be called.

Definition at line 105 of file StoredContainer.java.

References com::sleepycat::collections::DataView::readUncommittedAllowed.

boolean com::sleepycat::collections::StoredContainer::isEmpty  )  [inline]
 

Returns true if this map or collection contains no mappings or elements. This method conforms to the java.util.Collection#isEmpty and java.util.Map#isEmpty interfaces.

Returns:
whether the container is empty.
Exceptions:
RuntimeExceptionWrapper if a DatabaseException is thrown.

Definition at line 256 of file StoredContainer.java.

References com::sleepycat::collections::DataView::isEmpty().

final boolean com::sleepycat::collections::StoredContainer::isOrdered  )  [inline]
 

Returns whether keys are ordered in this container. Keys are ordered for BTREE, RECNO and QUEUE database. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Note that the JE product only support BTREE databases, and therefore keys are always ordered.

Returns:
whether keys are ordered.

Definition at line 213 of file StoredContainer.java.

References com::sleepycat::collections::DataView::ordered.

final boolean com::sleepycat::collections::StoredContainer::isSecondary  )  [inline]
 

Returns whether this container is a view on a secondary database rather than directly on a primary database. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Returns:
whether the view is for a secondary database.

Definition at line 226 of file StoredContainer.java.

References com::sleepycat::collections::DataView::isSecondary().

final boolean com::sleepycat::collections::StoredContainer::isTransactional  )  [inline]
 

Returns whether the databases underlying this container are transactional. Even in a transactional environment, a database will be transactional only if it was opened within a transaction or if the auto-commit option was specified when it was opened. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Returns:
whether the database is transactional.

Definition at line 131 of file StoredContainer.java.

References com::sleepycat::collections::DataView::transactional.

final boolean com::sleepycat::collections::StoredContainer::isWriteAllowed  )  [inline]
 

Returns true if this is a read-write container or false if this is a read-only container. This method does not exist in the standard java.util.Map or java.util.Collection interfaces.

Returns:
whether write is allowed.

Definition at line 68 of file StoredContainer.java.

References com::sleepycat::collections::DataView::writeAllowed.

Referenced by com::sleepycat::collections::StoredCollection::iterator(), and com::sleepycat::collections::StoredList::listIterator().

int com::sleepycat::collections::StoredContainer::size  )  [inline]
 

Always throws UnsupportedOperationException. The size of a database cannot be obtained reliably or inexpensively. This method therefore violates the java.util.Collection#size and java.util.Map#size interfaces.

Returns:
always throws an exception.
Exceptions:
UnsupportedOperationException unconditionally.

Reimplemented in com::sleepycat::collections::StoredValueSet.

Definition at line 241 of file StoredContainer.java.


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:15:00 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2