|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcontext.arch.storage.VectorStorage
This class allows storage and retrieval of data in String, Integer, Long, Float, Double, or Short format. It implements the Storage interface, using a Vector to store data temporarily. It can flush locally stored data to persistent data upon request.
| Field Summary | |
static long |
DEFAULT_FLUSH_CONDITION
Default flush condition is 2 (i.e. |
static int |
DEFAULT_FLUSH_TYPE
Default flush type is by number of stores |
static char |
NEW_SEPARATOR
Separator used by database in structured info |
static java.lang.String |
NEW_SEPARATOR_STRING
Separator used by database in structured info - String |
static char |
OLD_SEPARATOR
Separator used in structured info |
static java.lang.String |
OLD_SEPARATOR_STRING
Separator used in structured info - String |
| Fields inherited from interface context.arch.storage.Storage |
DATA, EQUAL, GREATERTHAN, GREATERTHANEQUAL, LESSTHAN, LESSTHANEQUAL, NO_STORAGE, TIME |
| Constructor Summary | |
VectorStorage(java.lang.String table)
Basic constructor that uses the default flush condition |
|
VectorStorage(java.lang.String tableName,
java.lang.Integer flushType,
java.lang.Long flushCondition)
Basic constructor that uses the given flush type and condition |
|
| Method Summary | |
boolean |
checkFlushCondition()
Checks condition under which local data is sent to persistent storage. |
void |
flushStorage()
Flushes local data to persistent storage |
RetrievalResults |
retrieveAttributes(Retrieval retrieval)
This method returns a Vector containing AttributeNameValue objects that match the given conditions in the Retrieval object. |
RetrievalResults |
retrieveAttributes(java.lang.String accessorId,
Retrieval retrieval)
This method returns a Vector containing AttributeNameValue objects that match the given conditions in the Retrieval object. |
void |
setAttributes(Attributes attributes,
java.util.Hashtable attTypes)
This method sets the attributes to use for storage. |
void |
store(Attributes atts)
This method stores the given AttributeNameValues object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_FLUSH_TYPE
public static final long DEFAULT_FLUSH_CONDITION
public static final char OLD_SEPARATOR
public static final java.lang.String OLD_SEPARATOR_STRING
public static final char NEW_SEPARATOR
public static final java.lang.String NEW_SEPARATOR_STRING
| Constructor Detail |
public VectorStorage(java.lang.String table)
throws java.sql.SQLException
table - Name of table to use
java.sql.SQLException - if errors in accessing table info
public VectorStorage(java.lang.String tableName,
java.lang.Integer flushType,
java.lang.Long flushCondition)
throws java.sql.SQLException
flushType - Flush to database based on TIME or DATAflushCondition - Condition to flush local storage to database
java.sql.SQLException - if errors in accessing table info| Method Detail |
public void store(Attributes atts)
store in interface Storageatts - AttributeNameValues to store
public RetrievalResults retrieveAttributes(java.lang.String accessorId,
Retrieval retrieval)
retrieveAttributes in interface StorageaccessorId - Id of the "user" trying to retrieve the dataretrieval - Retrievals object containing conditions for data retrieval
public RetrievalResults retrieveAttributes(Retrieval retrieval)
retrieveAttributes in interface Storageretrieval - Retrievals object containing conditions for data retrieval
public boolean checkFlushCondition()
checkFlushCondition in interface Storagepublic void flushStorage()
flushStorage in interface Storage
public void setAttributes(Attributes attributes,
java.util.Hashtable attTypes)
setAttributes in interface Storageattributes - Attributes object containing attributes and type infoattTypes - Flattened hashtable version of Attributes
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||