public interface RealmReaderWriter
Modifier and Type | Method and Description |
---|---|
boolean |
create(RealmDefinition rd)
Creates a new new realm store.
|
void |
deleteCachedAsOriginal(String id) |
void |
deleteMasterRecord(String id) |
void |
deleteOverrideRecord(String id) |
void |
deleteParentRealm(String prId) |
void |
deleteWorldRecordsByParentId(String prId) |
RealmDefinition |
describe()
Retrieves RealmDefinition for the given realm.
|
void |
destroy()
Destroys the underlying record store;
|
boolean |
isCachedAsParent()
In case the realm serves as parent to other realms within the same torus
installation, the following function allows for fast propagation of changes
to child realms.
|
List<RealmDefinition> |
listRealms()
List all realms available within the torus.
|
boolean |
open()
Attempts to open the realm store pointed to by this instance.
|
Record.Layer |
readMasterRecord(String id) |
List<Record.Layer> |
readMasterRecords() |
Record.Layer |
readOverrideRecord(String id)
Retrieve override record by id.
|
List<Record.Layer> |
readOverrideRecords()
Retrieve a list of override records within this realm, the query
parameter is used ONLY to early filter out false matches, that is
records that CONTAIN a given query field but the value DOES NOT match.
|
ParentRealm |
readParentRealm(String prId) |
List<ParentRealm> |
readParentRealms() |
Record.Layer |
readWorldRecord(String realmUniqueId)
Retrieve world (within a set of parents) record by id.
|
Pair<List<Record.Layer>,Date> |
readWorldRecordsForParent(String prId)
Retrieve a time-stamped list of records for a parent specified within this realm,
|
boolean |
update(RealmDefinition rd)
Updates realm meta-data.
|
Record.Layer |
updateCachedAsOriginal(Record.Layer original) |
Record.Layer |
writeMasterRecord(Record.Layer record) |
Record.Layer |
writeMasterRecord(String id,
Record.Layer record) |
Record.Layer |
writeOverrideRecord(Record.Layer over)
The method is to write new record to the record store.
|
Record.Layer |
writeOverrideRecord(String id,
Record.Layer over)
Write data to the existing record.
|
ParentRealm |
writeParentRealm(ParentRealm pr) |
ParentRealm |
writeParentRealm(String prId,
ParentRealm pr) |
List<Record.Layer> |
writeWorldRecordsForParent(List<Record.Layer> recs,
String prId)
Stores parent records for the given parent, updates each world record
with an ID unique to this realm (so world records can be looked up without
specifying parent)
|
List<Record.Layer> |
writeWorldRecordsForParent(List<Record.Layer> recs,
String prId,
Date timestamp) |
boolean create(RealmDefinition rd) throws InternalIOException
InternalIOException
- when creation failedboolean open() throws InternalIOException
InternalIOException
boolean update(RealmDefinition rd) throws InternalIOException
InternalIOException
RealmDefinition describe()
InternalIOException
void destroy() throws InternalIOException
InternalIOException
List<Record.Layer> readOverrideRecords() throws InternalIOException
query
- early filtering query, can be nullInternalIOException
- when experiencing problems reading/parsing recordsNotFoundException
- when records are missing RATHER than returning 'null'Record.Layer readOverrideRecord(String id) throws InternalIOException
id
- override record idInternalIOException
- when experiencing problems reading/parsing recordsNotFoundException
- when record is missing RATHER than returning 'null'Record.Layer writeOverrideRecord(String id, Record.Layer over) throws InternalIOException
id
- id of the recordsdoc
- new contents for the recordInternalIOException
Record.Layer writeOverrideRecord(Record.Layer over) throws InternalIOException
doc
- contents of the record to writeInternalIOException
void deleteOverrideRecord(String id) throws InternalIOException
InternalIOException
Pair<List<Record.Layer>,Date> readWorldRecordsForParent(String prId) throws InternalIOException
InternalIOException
- when experiencing problems reading/parsing recordsNotFoundException
- when records are missing RATHER than returning 'null'Record.Layer readWorldRecord(String realmUniqueId) throws InternalIOException, MalformedInputException
id
- override record idInternalIOException
- when experiencing problems reading/parsing recordsNotFoundException
- when record is missing RATHER than returning 'null'MalformedInputException
- when the realmUniqueId is malformedList<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> recs, String prId) throws InternalIOException
recs
- prId
- InternalIOException
List<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> recs, String prId, Date timestamp) throws InternalIOException
InternalIOException
void deleteWorldRecordsByParentId(String prId) throws InternalIOException
InternalIOException
ParentRealm readParentRealm(String prId) throws InternalIOException
InternalIOException
ParentRealm writeParentRealm(String prId, ParentRealm pr) throws InternalIOException
InternalIOException
ParentRealm writeParentRealm(ParentRealm pr) throws InternalIOException
InternalIOException
void deleteParentRealm(String prId) throws InternalIOException
InternalIOException
List<ParentRealm> readParentRealms() throws InternalIOException
InternalIOException
List<RealmDefinition> listRealms() throws InternalIOException
InternalIOException
boolean isCachedAsParent() throws InternalIOException
InternalIOException
Record.Layer updateCachedAsOriginal(Record.Layer original) throws InternalIOException
InternalIOException
void deleteCachedAsOriginal(String id) throws InternalIOException
InternalIOException
Record.Layer readMasterRecord(String id) throws InternalIOException
InternalIOException
Record.Layer writeMasterRecord(String id, Record.Layer record) throws InternalIOException
InternalIOException
Record.Layer writeMasterRecord(Record.Layer record) throws InternalIOException
InternalIOException
List<Record.Layer> readMasterRecords() throws InternalIOException
InternalIOException
void deleteMasterRecord(String id) throws InternalIOException
InternalIOException
Copyright © 2008-2015 Index Data. All Rights Reserved.