Definition at line 50 of file FODBCollectionFile.java.
Public Member Functions | |
boolean | isSynchronized () |
FODBCypher | getCollectionCypher () throws FODBException |
return the collection cypher if any, null otherwise. | |
boolean | isCompressed () |
if isCompressed return true, all stored data object are zipped. | |
void | setCollectionCypher (FODBCypher cypher) throws FODBException |
Init collection encryption with the specified cypher. | |
synchronized long | addIndex (long indexPos) throws IOException, ClassNotFoundException |
Add an index to the indexs table. | |
Object | readNode (long pos) throws IOException, ClassNotFoundException |
Read Object at pos. | |
long | writeNode (Object obj) throws IOException, ClassNotFoundException |
Write an object. | |
void | rewriteNode (Object obj, long pos) throws IOException, ClassNotFoundException |
Rewrite an object The object has to be the same size it used to be. | |
Object | readObject (long pos) throws IOException, ClassNotFoundException |
Read Object at pos. | |
long | writeObject (Object obj) throws IOException, ClassNotFoundException |
Write an object. | |
void | rewriteObjectt (Object obj, long pos) throws IOException, ClassNotFoundException |
Rewrite an object The object has to be the same size it used to be. | |
void | deleteObject (long pos) throws IOException, ClassNotFoundException |
Delete an Object. | |
void | writeHeader () throws IOException, ClassNotFoundException |
Write the header at the beginning of the collection file. | |
void | rewriteHeader () throws IOException, ClassNotFoundException |
FODBCollectionFileHeader | readHeader () throws IOException, ClassNotFoundException |
Read the header which is situated at the beginning of the collection file and return it. | |
Class | getObjectType () |
FODBIndexHeader[] | getIndexsHeaders () throws IOException, ClassNotFoundException |
Read the indexs table. | |
FODBCollectionDescriptor | getDescriptor () |
String | toString () |
Used for debugging. | |
Static Public Member Functions | |
static FODBCollectionFile | createCollection (String filePath, FODBCollectionDescriptor descriptor, FastObjectDB db) throws IOException, ClassNotFoundException |
The function that is called to create a new Collection file. | |
static FODBCollectionFile | openCollection (String filePath, String colname, FastObjectDB db) throws IOException, ClassNotFoundException |
The function that is called to open an existing Collection file. |
|
Add an index to the indexs table.
Definition at line 197 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.index.FODBIndexTable.add(). Referenced by org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.addIndexPointerToTable(). |
|
The function that is called to create a new Collection file. It just calls the constructor with the argument ACTION_CREATE.
Definition at line 171 of file FODBCollectionFile.java. |
|
Delete an Object.
Definition at line 366 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.delete(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.seek(). Referenced by org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.deleteLongPtr(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.deleteNode(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteObjectWithId(). |
|
return the collection cypher if any, null otherwise.
Definition at line 125 of file FODBCollectionFile.java. Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionCypher(). |
|
Read the indexs table. Then get all indexs header, and return them as a table.
Definition at line 420 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.index.FODBIndexTable.getPosByPlace(), org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.readObject(), org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.seek(), and org.openmobileis.database.fastobjectdb.db.index.FODBIndexTable.size(). |
|
if isCompressed return true, all stored data object are zipped. The compressed behaviour is defined by the FODBCollection descriptor. To gzip collection allow to gain around 25% of the collection file length but increase the synhro file size for complete synchro.
Definition at line 136 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBCollectionFileHeader.getDescriptor(), and org.openmobileis.database.fastobjectdb.FODBCollectionDescriptor.isCompressed(). |
|
The function that is called to open an existing Collection file. It just calls the constructor with the argument ACTION_OPEN.
Definition at line 182 of file FODBCollectionFile.java. |
|
Read the header which is situated at the beginning of the collection file and return it.
Definition at line 393 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.readObject(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.rewind(). |
|
Read Object at pos.
Definition at line 232 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.readObject(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.seek(). Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.getNodeAtPos(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.readLongPtr(), and org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.readNode(). |
|
Read Object at pos.
Definition at line 269 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.crypto.FODBCypher.decryptObject(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionFileHeader.getDescriptor(), org.openmobileis.database.fastobjectdb.FODBCollectionDescriptor.isCompressed(), org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.readObject(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.seek(). Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.getElementAtPos(). |
|
Rewrite an object The object has to be the same size it used to be. The function doesn't check this. It is the role of the developper.
Definition at line 257 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.rewriteObject(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.seek(). Referenced by org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.rewriteHeader(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.rewriteLongPtr(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.rewriteNode(), and org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeNode(). |
|
Rewrite an object The object has to be the same size it used to be. The function doesn't check this. It is the role of the developper.
Definition at line 345 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.crypto.FODBCypher.encryptObject(), org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.rewriteObject(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.seek(). |
|
Init collection encryption with the specified cypher. Must be call just after collection initialization before storing/reading any data. Same cypher must be provided to read already stored object.
Definition at line 147 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.close(), org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.open(), and org.openmobileis.database.fastobjectdb.db.store.FODBCollectionFile.rewriteHeader(). Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.setCollectionCypher(). |
|
Write the header at the beginning of the collection file.
Definition at line 376 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.rewind(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.writeObject(). |
|
Write an object.
Definition at line 244 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.writeObject(). Referenced by org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeHeader(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeLongPtr(), and org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeNode(). |
|
Write an object.
Definition at line 303 of file FODBCollectionFile.java. References org.openmobileis.database.fastobjectdb.db.crypto.FODBCypher.encryptObject(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionFileHeader.getDescriptor(), org.openmobileis.database.fastobjectdb.FODBCollectionDescriptor.isCompressed(), and org.openmobileis.database.fastobjectdb.db.store.FODBObjectDatabaseFile.writeObject(). Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.addElement(). |