FTPersistentSetImpl


Abstract

Utility class which uses a BDB database in order to manage a set of objects in the database

Methods

-addObject:
Adds a object to the set. This object must implement NSCoding.
-chunkAtRecordNumber:
Tries to read a chunk from the specified record.
-chunkContainingObject:
-chunkIterator
Note that iterating over chunks is an expensive operation at present
-containsObject:
This is an expensive operation at present
-count
Expensive operation used to determine the number of elements in this set
-dbConfig
-iterator
Returns an iterator over all members of this set. This is an expensive operation at present
-newChunk
Examines new available chunk and sets up corresponding internal fields appropriately
-removeObject:
removes the specified object from the set. Operation is ignored the object could no be found within the set.
-validateDBIsOpen
throws an exception if the database is not opened since this marks an illegal state

addObject:


Adds a object to the set. This object must implement NSCoding.

- addObject: (id) anObject;
method result
self

chunkAtRecordNumber:


Tries to read a chunk from the specified record.

- (_FTPersistentSetChunk *) chunkAtRecordNumber: (unsigned) recNr;
Parameter Descriptions
recNr
record number to read from
method result
related chunk or nil if not existent at the given record number

chunkContainingObject:


- (_FTPersistentSetChunk *) chunkContainingObject: (id) anObject;
Parameter Descriptions
anObject
object to look for
method result
returns the chunk which contains the specified object or nil if not existent

chunkIterator


Note that iterating over chunks is an expensive operation at present

- (id <ECIterator>) chunkIterator;
method result
iterator of all chunks

containsObject:


This is an expensive operation at present

- (BOOL) containsObject: (id) anObject;
method result
YES if the specified object is to be found in the set.

count


Expensive operation used to determine the number of elements in this set

- (unsigned) count;
method result
number of elements in the current set

dbConfig


- (BDBDatabaseConfig *) dbConfig;
method result
configuration settings for the underlying database

iterator


Returns an iterator over all members of this set. This is an expensive operation at present

- (id <ECIterator>) iterator;
method result
iterator over all elements of the set

newChunk


Examines new available chunk and sets up corresponding internal fields appropriately

- newChunk;
method result
self

removeObject:


removes the specified object from the set. Operation is ignored the object could no be found within the set.

- removeObject: (id) anObject;
method result
self

validateDBIsOpen


throws an exception if the database is not opened since this marks an illegal state

- (void) validateDBIsOpen;

(Last Updated August 27, 2006)