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, writeOverrideRecord
public CachingReaderWriter(RealmReaderWriter rw, String host, String proto, boolean honorProto, boolean honorAuth, boolean honorPort) throws InternalIOException
InternalIOException
public boolean open() throws InternalIOException
RealmReaderWriter
open
in interface RealmReaderWriter
open
in class ProxyReaderWriter
InternalIOException
public ParentRealm writeParentRealm(String prId, ParentRealm pr) throws InternalIOException
writeParentRealm
in interface RealmReaderWriter
writeParentRealm
in class ProxyReaderWriter
InternalIOException
public ParentRealm writeParentRealm(ParentRealm pr) throws InternalIOException
writeParentRealm
in interface RealmReaderWriter
writeParentRealm
in class ProxyReaderWriter
InternalIOException
public void deleteParentRealm(String prId) throws InternalIOException
deleteParentRealm
in interface RealmReaderWriter
deleteParentRealm
in class ProxyReaderWriter
InternalIOException
public ParentRealm readParentRealm(String prId) throws InternalIOException
readParentRealm
in interface RealmReaderWriter
readParentRealm
in class ProxyReaderWriter
InternalIOException
public List<ParentRealm> readParentRealms() throws InternalIOException
readParentRealms
in interface RealmReaderWriter
readParentRealms
in class ProxyReaderWriter
InternalIOException
public Pair<List<Record.Layer>,Date> readWorldRecordsForParent(String prId) throws InternalIOException
RealmReaderWriter
readWorldRecordsForParent
in interface RealmReaderWriter
readWorldRecordsForParent
in class ProxyReaderWriter
InternalIOException
- when experiencing problems reading/parsing recordspublic Record.Layer readWorldRecord(String prefixId) throws InternalIOException, MalformedInputException
RealmReaderWriter
readWorldRecord
in interface RealmReaderWriter
readWorldRecord
in class ProxyReaderWriter
InternalIOException
- when experiencing problems reading/parsing recordsMalformedInputException
- when the realmUniqueId is malformedpublic List<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> docs, String prId) throws InternalIOException
RealmReaderWriter
writeWorldRecordsForParent
in interface RealmReaderWriter
writeWorldRecordsForParent
in class ProxyReaderWriter
InternalIOException
public List<Record.Layer> writeWorldRecordsForParent(List<Record.Layer> docs, String prId, Date timestamp) throws InternalIOException
writeWorldRecordsForParent
in interface RealmReaderWriter
writeWorldRecordsForParent
in class ProxyReaderWriter
InternalIOException
public void deleteWorldRecordsByParentId(String prId) throws InternalIOException
deleteWorldRecordsByParentId
in interface RealmReaderWriter
deleteWorldRecordsByParentId
in class ProxyReaderWriter
InternalIOException
public boolean isCachedAsParent() throws InternalIOException
RealmReaderWriter
isCachedAsParent
in interface RealmReaderWriter
isCachedAsParent
in class ProxyReaderWriter
InternalIOException
public void deleteCachedAsOriginal(String id) throws InternalIOException
deleteCachedAsOriginal
in interface RealmReaderWriter
deleteCachedAsOriginal
in class ProxyReaderWriter
InternalIOException
public Record.Layer updateCachedAsOriginal(Record.Layer original) throws InternalIOException
updateCachedAsOriginal
in interface RealmReaderWriter
updateCachedAsOriginal
in class ProxyReaderWriter
InternalIOException
Copyright © 2008-2015 Index Data. All Rights Reserved.