The DataStore interface is implemented by an application and is used by an engine to store models and other associated information. This interface allows blobs (refered to as records in this interface) to be saved, retrieved, deleted and locked. An attempt to access a record which is locked by another process causes the process to block until the record in question is available or the function times out. If the request times out, the call will throw a RecordNotAvailableException. A record which is locked multiple times is unlocked with a single unlock operation. The records are referenced by name. If an engine needs to store data that does not correspond to an application-created model (for example, cohorts that ship with the engine), it should create a name that will likely be unique. For example, an engine could prefix the names with a space followed by the engine name. An engine that does so should reject any application-specified model names that would conflict with its private namespace.
See Also: getDataStore
public abstract void storeRecord(String Name, byte Data[])
Stores a record in the database. If the record specified is currently unallocated, it is allocated and the data is stored. If the record specified currently has data stored in it, it is replaced with the new data.
Exceptions:
See Also: retrieveRecord
public abstract byte[] retrieveRecord(String Name)
Retrieves a record from the database.
Exceptions:
See Also: storeRecord
public abstract boolean deleteRecord(String Name)
Deletes a record from the database. The function returns false if the record did not exist. The function returns true if the record existed and was deleted.
Exceptions:
public abstract void createAndLock(String Name)
Creates and locks a record atomically.
Exceptions:
public abstract boolean recordExists(String Name)
Returns true if a record exists in the database.
Exceptions:
public abstract RemoteList getAllNames()
Returns an enumeration of the names of all allocated records.
Exceptions:
public abstract void lockRecord(String Name)
Locks a record in the database. Locked data cannot be read, modified, deleted or locked by another process.
Exceptions:
See Also: unlockRecords
public abstract void unlockRecord(String Name)
Unlocks a record in the database.
Exceptions:
See Also: lockRecords
public abstract void lockRecords(String Names[])
Locks records in the database. Locked data cannot be read, modified, deleted or locked by another process.
Exceptions:
See Also: unlockRecords
public abstract void unlockRecords(String Names[])
Unlocks records in the database.
Exceptions:
See Also: lockRecords