public class CachingReaderWriter extends ProxyReaderWriter
rw| Constructor and Description |
|---|
CachingReaderWriter(RealmReaderWriter rw,
String host,
String proto,
boolean honorProto,
boolean honorAuth,
boolean honorPort) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteCachedAsOriginal(String id) |
void |
deleteParentRealm(String prId) |
void |
deleteWorldRecordsByParentId(String prId) |
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.
|
boolean |
open()
Attempts to open the realm store pointed to by this instance.
|
ParentRealm |
readParentRealm(String prId) |
List<ParentRealm> |
readParentRealms() |
Record.Layer |
readWorldRecord(String prefixId)
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,
|
Record.Layer |
updateCachedAsOriginal(Record.Layer original) |
ParentRealm |
writeParentRealm(ParentRealm pr) |
ParentRealm |
writeParentRealm(String prId,
ParentRealm pr) |
List<Record.Layer> |
writeWorldRecordsForParent(List<Record.Layer> docs,
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> docs,
String prId,
Date timestamp) |
create, deleteMasterRecord, deleteOverrideRecord, describe, destroy, listRealms, readMasterRecord, readMasterRecords, readOverrideRecord, readOverrideRecords, update, writeMasterRecord, writeMasterRecord, writeOverrideRecord, writeOverrideRecordpublic CachingReaderWriter(RealmReaderWriter rw, String host, String proto, boolean honorProto, boolean honorAuth, boolean honorPort) throws InternalIOException
InternalIOExceptionpublic boolean open()
throws InternalIOException
RealmReaderWriteropen in interface RealmReaderWriteropen in class ProxyReaderWriterInternalIOExceptionpublic ParentRealm writeParentRealm(String prId, ParentRealm pr) throws InternalIOException
writeParentRealm in interface RealmReaderWriterwriteParentRealm in class ProxyReaderWriterInternalIOExceptionpublic ParentRealm writeParentRealm(ParentRealm pr) throws InternalIOException
writeParentRealm in interface RealmReaderWriterwriteParentRealm in class ProxyReaderWriterInternalIOExceptionpublic void deleteParentRealm(String prId) throws InternalIOException
deleteParentRealm in interface RealmReaderWriterdeleteParentRealm in class ProxyReaderWriterInternalIOExceptionpublic ParentRealm readParentRealm(String prId) throws InternalIOException
readParentRealm in interface RealmReaderWriterreadParentRealm in class ProxyReaderWriterInternalIOExceptionpublic List<ParentRealm> readParentRealms() throws InternalIOException
readParentRealms in interface RealmReaderWriterreadParentRealms in class ProxyReaderWriterInternalIOExceptionpublic Pair<List<Record.Layer>,Date> readWorldRecordsForParent(String prId) throws InternalIOException
RealmReaderWriterreadWorldRecordsForParent in interface RealmReaderWriterreadWorldRecordsForParent in class ProxyReaderWriterInternalIOException - when experiencing problems reading/parsing recordspublic Record.Layer readWorldRecord(String prefixId) throws InternalIOException, MalformedInputException
RealmReaderWriterreadWorldRecord in interface RealmReaderWriterreadWorldRecord in class ProxyReaderWriterInternalIOException - when experiencing problems reading/parsing recordsMalformedInputException - when the realmUniqueId is malformedpublic List<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> docs, String prId) throws InternalIOException
RealmReaderWriterwriteWorldRecordsForParent in interface RealmReaderWriterwriteWorldRecordsForParent in class ProxyReaderWriterInternalIOExceptionpublic List<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> docs, String prId, Date timestamp) throws InternalIOException
writeWorldRecordsForParent in interface RealmReaderWriterwriteWorldRecordsForParent in class ProxyReaderWriterInternalIOExceptionpublic void deleteWorldRecordsByParentId(String prId) throws InternalIOException
deleteWorldRecordsByParentId in interface RealmReaderWriterdeleteWorldRecordsByParentId in class ProxyReaderWriterInternalIOExceptionpublic boolean isCachedAsParent()
throws InternalIOException
RealmReaderWriterisCachedAsParent in interface RealmReaderWriterisCachedAsParent in class ProxyReaderWriterInternalIOExceptionpublic void deleteCachedAsOriginal(String id) throws InternalIOException
deleteCachedAsOriginal in interface RealmReaderWriterdeleteCachedAsOriginal in class ProxyReaderWriterInternalIOExceptionpublic Record.Layer updateCachedAsOriginal(Record.Layer original) throws InternalIOException
updateCachedAsOriginal in interface RealmReaderWriterupdateCachedAsOriginal in class ProxyReaderWriterInternalIOExceptionCopyright © 2008-2015 Index Data. All Rights Reserved.