|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--context.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(AttributeNameValues 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 usepublic VectorStorage(java.lang.String tableName, java.lang.Integer flushType, java.lang.Long flushCondition) throws java.sql.SQLException
table
- Name of table to useflushType
- Flush to database based on TIME or DATAflushCondition
- Condition to flush local storage to databaseMethod Detail |
public void store(AttributeNameValues atts)
atts
- AttributeNameValues to storepublic RetrievalResults retrieveAttributes(java.lang.String accessorId, Retrieval retrieval)
accessorId
- Id of the "user" trying to retrieve the dataretrieval
- Retrievals object containing conditions for data retrievalpublic RetrievalResults retrieveAttributes(Retrieval retrieval)
retrieval
- Retrievals object containing conditions for data retrievalpublic boolean checkFlushCondition()
public void flushStorage()
public void setAttributes(Attributes attributes, java.util.Hashtable attTypes)
attributes
- Attributes object containing attributes and type infoattTypes
- Flattened hashtable version of Attributes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |