|
DefaultPersistenceManager(Context ctx, PersistenceStorageEngine engine, CachePolicy cachePolicy, Clock clock)
|
| void | |
| void | |
| List<UserWriteRecord> |
loadUserWrites()
Return a list of all writes that were persisted
|
| void |
removeAllUserWrites()
Removes all writes
|
| void |
removeUserWrite(long writeId)
Remove a write with the given write id.
|
| <T> T |
runInTransaction(Callable<T> callable)
|
| void | |
| void | |
| CacheNode | |
| void |
setQueryActive(QuerySpec query)
|
| void |
setQueryComplete(QuerySpec query)
|
| void |
setQueryInactive(QuerySpec query)
|
| void | |
| void |
updateServerCache(QuerySpec query, Node node)
Overwrite the server cache with the given node for a given query.
|
| void |
updateServerCache(Path path, CompoundWrite children)
Update the server cache at the given path with the given merge.
|
| void |
| ctx | |
|---|---|
| engine | |
| cachePolicy |
| ctx | |
|---|---|
| engine | |
| cachePolicy | |
| clock |
Return a list of all writes that were persisted
Removes all writes
Remove a write with the given write id.
| writeId | The write id to remove |
|---|
Save a user merge
| path | The path for this merge |
|---|---|
| children | The children for this merge |
| writeId | The write id that was used for this merge |
Save a user overwrite
| path | The path for this write |
|---|---|
| node | The node for this write |
| writeId | The write id that was used for this write |
Returns any cached node or children as a CacheNode. The query is *not* used to filter the node but rather to determine if it can be considered complete.
| query | The query at the path |
|---|
Overwrite the server cache with the given node for a given query. The query is considered to be complete after saving this node.
| query | The query for which to apply this overwrite. |
|---|---|
| node | The node to replace in the cache at the given path |
Update the server cache at the given path with the given merge.
NOTE: This doesn't mark any queries complete, since the common case is that there's already a complete query above this location.
| path | The path for this merge |
|---|---|
| children | The children to update |