|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.indexdata.torus2.rw.impl.RealmFileRW
public class RealmFileRW
Flat, multi-file implementation of the record store
Constructor Summary | |
---|---|
RealmFileRW(String realmName,
String basePath)
Opens RW on a specified realm. |
Method Summary | |
---|---|
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; |
Object |
getLock(String host)
|
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 id)
Retrieve world (within a set of parents) record by id. |
List<Record.Layer> |
readWorldRecordsForParent(String prId)
Retrieve a list of records for a parent specified within this realm, |
Record.Layer |
updateCachedAsOriginal(Record.Layer original)
|
Record.Layer |
writeMasterRecord(Record.Layer masterLayer)
|
Record.Layer |
writeMasterRecord(String id,
Record.Layer update)
|
Record.Layer |
writeOverrideRecord(Record.Layer override)
The method is to write new record to the record store. |
Record.Layer |
writeOverrideRecord(String id,
Record.Layer update)
Write data to the existing record. |
ParentRealm |
writeParentRealm(ParentRealm pr)
|
ParentRealm |
writeParentRealm(String id,
ParentRealm pr)
|
List<Record.Layer> |
writeWorldRecordsForParent(List<Record.Layer> doc,
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) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RealmFileRW(String realmName, String basePath)
realmName
- basePath
- Method Detail |
---|
public Object getLock(String host)
public boolean create(RealmDefinition rd) throws InternalIOException
RealmReaderWriter
create
in interface RealmReaderWriter
InternalIOException
public boolean open() throws InternalIOException
RealmReaderWriter
open
in interface RealmReaderWriter
InternalIOException
public RealmDefinition describe()
RealmReaderWriter
describe
in interface RealmReaderWriter
public void destroy() throws InternalIOException
RealmReaderWriter
destroy
in interface RealmReaderWriter
InternalIOException
public List<Record.Layer> readOverrideRecords() throws InternalIOException
RealmReaderWriter
readOverrideRecords
in interface RealmReaderWriter
InternalIOException
- when experiencing problems reading/parsing recordspublic Record.Layer readOverrideRecord(String id) throws InternalIOException
RealmReaderWriter
readOverrideRecord
in interface RealmReaderWriter
id
- override record id
InternalIOException
- when experiencing problems reading/parsing recordspublic Record.Layer writeOverrideRecord(String id, Record.Layer update) throws InternalIOException
RealmReaderWriter
writeOverrideRecord
in interface RealmReaderWriter
id
- id of the records
InternalIOException
public Record.Layer writeOverrideRecord(Record.Layer override) throws InternalIOException
RealmReaderWriter
writeOverrideRecord
in interface RealmReaderWriter
InternalIOException
public void deleteOverrideRecord(String id) throws InternalIOException
deleteOverrideRecord
in interface RealmReaderWriter
InternalIOException
public List<Record.Layer> readWorldRecordsForParent(String prId) throws InternalIOException
RealmReaderWriter
readWorldRecordsForParent
in interface RealmReaderWriter
InternalIOException
- when experiencing problems reading/parsing recordspublic Record.Layer readWorldRecord(String id) throws InternalIOException
RealmReaderWriter
readWorldRecord
in interface RealmReaderWriter
InternalIOException
- when experiencing problems reading/parsing recordspublic List<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> doc, String prId) throws InternalIOException
RealmReaderWriter
writeWorldRecordsForParent
in interface RealmReaderWriter
InternalIOException
public void deleteWorldRecordsByParentId(String prId) throws InternalIOException
deleteWorldRecordsByParentId
in interface RealmReaderWriter
InternalIOException
public ParentRealm writeParentRealm(String id, ParentRealm pr) throws InternalIOException
writeParentRealm
in interface RealmReaderWriter
InternalIOException
public ParentRealm writeParentRealm(ParentRealm pr) throws InternalIOException
writeParentRealm
in interface RealmReaderWriter
InternalIOException
public ParentRealm readParentRealm(String prId) throws InternalIOException
readParentRealm
in interface RealmReaderWriter
InternalIOException
public void deleteParentRealm(String prId) throws InternalIOException
deleteParentRealm
in interface RealmReaderWriter
InternalIOException
public List<ParentRealm> readParentRealms() throws InternalIOException
readParentRealms
in interface RealmReaderWriter
InternalIOException
public List<RealmDefinition> listRealms() throws InternalIOException
RealmReaderWriter
listRealms
in interface RealmReaderWriter
InternalIOException
public boolean isCachedAsParent() throws InternalIOException
RealmReaderWriter
isCachedAsParent
in interface RealmReaderWriter
InternalIOException
public Record.Layer updateCachedAsOriginal(Record.Layer original) throws InternalIOException
updateCachedAsOriginal
in interface RealmReaderWriter
InternalIOException
public void deleteCachedAsOriginal(String id) throws InternalIOException
deleteCachedAsOriginal
in interface RealmReaderWriter
InternalIOException
public List<Record.Layer> readMasterRecords() throws InternalIOException
readMasterRecords
in interface RealmReaderWriter
InternalIOException
public Record.Layer readMasterRecord(String id) throws InternalIOException
readMasterRecord
in interface RealmReaderWriter
InternalIOException
public Record.Layer writeMasterRecord(String id, Record.Layer update) throws InternalIOException
writeMasterRecord
in interface RealmReaderWriter
InternalIOException
public Record.Layer writeMasterRecord(Record.Layer masterLayer) throws InternalIOException
writeMasterRecord
in interface RealmReaderWriter
InternalIOException
public void deleteMasterRecord(String id) throws InternalIOException
deleteMasterRecord
in interface RealmReaderWriter
InternalIOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |