[Package Index] [Index] [Users' Guide] [SVAPI Home Page]

Interface COM.novell.SVAPI.DataStore

public interface DataStore extends Remote

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


Method Index

createAndLock(String)
Creates and locks a record atomically.
deleteRecord(String)
Deletes a record from the database.
getAllNames()
Returns an enumeration of the names of all allocated records.
lockRecord(String)
Locks a record in the database.
lockRecords(String[])
Locks records in the database.
recordExists(String)
Returns true if a record exists in the database.
retrieveRecord(String)
Retrieves a record from the database.
storeRecord(String, byte[])
Stores a record in the database.
unlockRecord(String)
Unlocks a record in the database.
unlockRecords(String[])
Unlocks records in the database.



Methods



storeRecord

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


retrieveRecord

public abstract byte[] retrieveRecord(String Name)
Retrieves a record from the database.
Exceptions:
See Also: storeRecord


deleteRecord

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:


createAndLock

public abstract void createAndLock(String Name)
Creates and locks a record atomically.
Exceptions:


recordExists

public abstract boolean recordExists(String Name)
Returns true if a record exists in the database.
Exceptions:


getAllNames

public abstract RemoteList getAllNames()
Returns an enumeration of the names of all allocated records.
Exceptions:


lockRecord

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


unlockRecord

public abstract void unlockRecord(String Name)
Unlocks a record in the database.
Exceptions:
See Also: lockRecords


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


unlockRecords

public abstract void unlockRecords(String Names[])
Unlocks records in the database.
Exceptions:
See Also: lockRecords



[Package Index] [Index] [Users' Guide] [SVAPI Home Page]

rwille@novell.com