|
Servertec Persistent Object Store 1.4.1 09/04/2005 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstec.xpos.IndexedObjectStore
public final class IndexedObjectStore
Contains static methods used to create, delete, open and pack indexed persistent object stores.
Indexed persistent object stores represent one or more indexes and associated persistent object store.
Operations performed on indexed persistent object stores are cascaded to associated indexes.
.ios Header
1 byte - type - the file type. Currently 0x10
2 bytes - version - the version number. Currently 0x0100 (1.0.0).
4 bytes - index_count - the number of indexes associated with the persistent object store. 1 or more.
n bytes - the utf-8 encoded filename the path and base file name of the object store.
n bytes - one or more utf-8 encoded index descriptors.
Index Descriptor
n bytes - index_name - the utf-8 encoded name of the index.
n bytes - filename - the utf-8 encoded filename the path and base file name of the index.
n bytes - indexer_class_name - the utf-8 encoded class name of the indexer.
UTF-8 Encoded String
2 byte - string_length - the length in bytes of the utf-8 encoded string.
n bytes - utf8_encoded_string - the utf-8 encoded string.
Constructor Summary | |
---|---|
IndexedObjectStore()
|
Method Summary | |
---|---|
static void |
addIndex(java.lang.String filename,
java.lang.String index_name,
java.lang.String index_filename,
java.lang.String indexer_classname)
Adds the named Index to the specified indexed persistent object store. |
static boolean |
containsIndex(java.lang.String filename,
java.lang.String index_name)
Returns whether the specified index is associated with the indexed object store. |
static void |
copy(java.lang.String from_filename,
java.lang.String to_filename,
boolean overwrite)
Copies the specified indexed object store |
static void |
copy(java.lang.String from_filename,
java.lang.String to_filename,
boolean overwrite,
boolean cascaded_copy)
Copies the specified indexed object store. |
static void |
create(java.lang.String filename,
java.lang.String object_store_filename,
IndexDescriptor[] index_descriptors,
boolean overwrite)
Used to create a new indexed persistent object store or to overwrite an existing indexed persistent object store. |
static void |
delete(java.lang.String filename)
Deletes the specified indexed persistent object store. |
static void |
delete(java.lang.String filename,
boolean cascaded_delete)
Deletes the specified indexed persistent object store. |
static boolean |
exists(java.lang.String filename)
Returns whether the specified indexed persistent object store currently exists. |
static IndexDescriptor[] |
getIndexDescriptors(java.lang.String filename)
Returns an array of one or more IndexDescriptors for indexes associated with the specified indexed object store. |
static java.lang.String |
getObjectStore(java.lang.String filename)
Returns the path and base file name of the persistent object store associated with the specified indexed object store. |
static boolean |
inUse(java.lang.String filename)
Returns whether the specified indexed persistent object store is being used. |
static void |
move(java.lang.String from_filename,
java.lang.String to_filename,
boolean overwrite)
Moves the specified indexed object store. |
static void |
move(java.lang.String from_filename,
java.lang.String to_filename,
boolean overwrite,
boolean cascaded_move)
Moves the specified indexed object store. |
static IndexedObjectStoreReference |
open(java.lang.String filename,
boolean exclusive)
Opens the specified indexed persistent object store and returns a stec.xpos.IndexedObjectStoreReference to it. |
static void |
pack(java.lang.String filename)
Releases unused space at the end of the specified indexed persistent object store back to the operating system. |
static void |
reindex(java.lang.String filename)
Clears all the associated indexes and performs potentially lengthy reindex on each index for all key, value pairs in the object store associated with the specified indexed object store. |
static void |
removeIndex(java.lang.String filename,
java.lang.String index_name)
Removes the named Index from the specified indexed persistent object store. |
static void |
removeIndex(java.lang.String filename,
java.lang.String index_name,
boolean cascaded_delete)
Removes the named Index from the specified indexed persistent object store. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexedObjectStore()
Method Detail |
---|
public static final void create(java.lang.String filename, java.lang.String object_store_filename, IndexDescriptor[] index_descriptors, boolean overwrite) throws java.lang.IllegalArgumentException, java.io.IOException
The specified object store and indexes must already exist before this method is called.
After the .ios is created the specified indexes are cleared and a potentially lengthy reindex is performed on each index for all key, value pairs in the specified object store.
Each index specified degrades performance since update operations are cascaded to associated indexes.
filename
- the path and base file name of the indexed persistent object store to create.object_store_filename
- the path and base file name of the persistent object store to use.index_descriptors
- an array of one or more stec.xpos.IndexDescriptors.overwrite
- whether to overwrite any existing indexed persistent object store.
java.lang.IllegalArgumentException
- if any of the parameters specified were not valid.
java.io.IOException
- if the indexed object store is in use, already exists or cannot be created or if an I/O exception occurred.delete
,
delete
public static final boolean exists(java.lang.String filename) throws java.io.IOException
Also checks whether the associated object store and indexes exist.
filename
- the path and base file name of the indexed persistent object store to test.
java.io.IOException
- if an I/O exception occurred.public static final void delete(java.lang.String filename, boolean cascaded_delete) throws java.io.FileNotFoundException, java.io.IOException
filename
- the path and base file name of the indexed persistent object store to delete.cascaded_delete
- whether to delete the associated object store and indexes.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be deleted or if an I/O exception occurred.create
public static final void delete(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
Also deletes the associated object store and indexes.
filename
- the path and base file name of the indexed persistent object store to delete.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be deleted or if an I/O exception occurred.create
public static final IndexedObjectStoreReference open(java.lang.String filename, boolean exclusive) throws java.io.FileNotFoundException, java.io.IOException
Also opens the associated object store and indexes.
filename
- the path and base file name of the indexed persistent object store to open.exclusive
- whether to open the indexed persistent object store reference for exlusive use.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is exclusively opened or cannot be opened or if an I/O exception occurred.IndexedObjectStoreReference
,
close
public static final void pack(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
Packing a large indexed persistent object store may take a long time.
Also packs the associated object store and indexes.
Java 1.2.0 or later is required to change the physical size of the object store and associated indexes.
filename
- the path and base file name of the indexed persistent object store to pack.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be packed or if an I/O exception occurred.public static final boolean inUse(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
Also checks the associated object store and indexes.
filename
- the path and base file name of the indexed persistent object store to test.
java.io.FileNotFoundException
- if the specified indexed object store does not exist.
java.io.IOException
- if an I/O exception occurred.public static final void addIndex(java.lang.String filename, java.lang.String index_name, java.lang.String index_filename, java.lang.String indexer_classname) throws java.io.FileNotFoundException, java.io.IOException
The specified index must already exist before this method is called.
Before the .ios is updated the specified index is cleared and a potentially lengthy reindex is performed on the index for all key, value pairs in the specified object store.
Each index added has a negative impact on performance since update operations are cascaded to associated indexes.
filename
- the path and base file name of the indexed persistent object store to use.index_name
- the name of the index.index_filename
- the path and base file name of the index.indexer_classname
- the name of the Indexer.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be updated or if an I/O exception occurred.public static final void removeIndex(java.lang.String filename, java.lang.String index_name, boolean cascaded_delete) throws java.io.FileNotFoundException, java.io.IOException
filename
- the path and base file name of the indexed persistent object store to use.index_name
- the name of the index to remove.cascaded_delete
- whether to delete the index file being removed.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be updated or if an I/O exception occurred.public static final void removeIndex(java.lang.String filename, java.lang.String index_name) throws java.io.FileNotFoundException, java.io.IOException
Deletes the index file being removed.
filename
- the path and base file name of the indexed persistent object store to use.index_name
- the name of the index to remove.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be updated or if an I/O exception occurred.public static final boolean containsIndex(java.lang.String filename, java.lang.String index_name) throws java.io.FileNotFoundException, java.io.IOException
filename
- the path and base file name of the indexed persistent object store to use.index_name
- the name of the index to check.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if an I/O exception occurred.public static final void reindex(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
filename
- the path and base file name of the indexed persistent object store to use.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if the indexed object store is in use or cannot be reindexed or if an I/O exception occurred.public static final IndexDescriptor[] getIndexDescriptors(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
filename
- the path and base file name of the indexed persistent object store to use.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if an I/O exception occurred.public static final java.lang.String getObjectStore(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
filename
- the path and base file name of the indexed persistent object store to use.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.io.IOException
- if an I/O exception occurred.public static final void copy(java.lang.String from_filename, java.lang.String to_filename, boolean overwrite, boolean cascaded_copy) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
from_filename
- the path and base file name of the indexed object store to copy.to_filename
- the path and base file name of the indexed object store to copy to.overwrite
- whether to overwrite any existing indexed object store.cascaded_copy
- whether to also copy associated object store and indexes.
java.lang.IllegalArgumentException
- if any of the parameters specified were not valid.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.lang.ClassNotFoundException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be found.
java.lang.IllegalAccessException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be loaded because the class is not public or is in another package.
java.lang.InstantiationException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be instantiated because it is an interface or an abstract class.
java.io.IOException
- if the indexed object store is in use or cannot be copied or if an I/O exception occurred.public static final void copy(java.lang.String from_filename, java.lang.String to_filename, boolean overwrite) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
Does not copy associated object store and indexes.
from_filename
- the path and base file name of the indexed object store to copy.to_filename
- the path and base file name of the indexed object store to copy to.overwrite
- whether to overwrite any existing indexed object store.
java.lang.IllegalArgumentException
- if any of the parameters specified were not valid.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.lang.ClassNotFoundException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be found.
java.lang.IllegalAccessException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be loaded because the class is not public or is in another package.
java.lang.InstantiationException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be instantiated because it is an interface or an abstract class.
java.io.IOException
- if the indexed object store is in use or cannot be copied or if an I/O exception occurred.public static final void move(java.lang.String from_filename, java.lang.String to_filename, boolean overwrite, boolean cascaded_move) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
from_filename
- the path and base file name of the indexed object store to move.to_filename
- the path and base file name of the indexed object store to move to.overwrite
- whether to overwrite any existing indexed object store.cascaded_move
- whether to also move associated obj store and indexes.
java.lang.IllegalArgumentException
- if any of the parameters specified were not valid.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.lang.ClassNotFoundException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be found.
java.lang.IllegalAccessException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be loaded because the class is not public or is in another package.
java.lang.InstantiationException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be instantiated because it is an interface or an abstract class.
java.io.IOException
- if the indexed object store is in use or cannot be moved or if an I/O exception occurred.public static final void move(java.lang.String from_filename, java.lang.String to_filename, boolean overwrite) throws java.lang.IllegalArgumentException, java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
Does not move associated object store and indexes.
from_filename
- the path and base file name of the indexed object store to move.to_filename
- the path and base file name of the indexed object store to move to.overwrite
- whether to overwrite any existing indexed object store.
java.lang.IllegalArgumentException
- if any of the parameters specified were not valid.
java.io.FileNotFoundException
- if the indexed object store does not exist.
java.lang.ClassNotFoundException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be found.
java.lang.IllegalAccessException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be loaded because the class is not public or is in another package.
java.lang.InstantiationException
- if the key_class_name, the value_class_name, the collator_class_name or the values_collator_class_name cannot be instantiated because it is an interface or an abstract class.
java.io.IOException
- if the indexed object store is in use or cannot be moved or if an I/O exception occurred.
|
Servertec Persistent Object Store 1.4.1 09/04/2005 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001-2005 Servertec. All rights reserved.