public class HGStoreSubgraph extends Object implements StorageGraph
A StorageGraph bound to a HGStore. It's based on a set of root handles
and its iterator will traverse the primitive storage graph starting from those roots.
| Constructor and Description |
|---|
HGStoreSubgraph(HGHandle root,
HGStore store)
Construct a new
HGStore based StorageGraph |
HGStoreSubgraph(Set<HGHandle> roots,
HGStore store)
Construct a new
HGStore based StorageGraph
with multiple roots. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData(HGPersistentHandle handle) |
HGPersistentHandle[] |
getLink(HGPersistentHandle handle) |
Set<HGPersistentHandle> |
getRoots()
Return the set of root handles for this storage sub-graph.
|
Iterator<Pair<HGPersistentHandle,Object>> |
iterator() |
HGPersistentHandle |
store(HGPersistentHandle handle,
byte[] data) |
HGPersistentHandle |
store(HGPersistentHandle handle,
HGPersistentHandle[] link) |
public HGStoreSubgraph(HGHandle root, HGStore store)
Construct a new HGStore based StorageGraph
root - A single root, starting point of the storage graph.store - The backing store instance.public HGStoreSubgraph(Set<HGHandle> roots, HGStore store)
Construct a new HGStore based StorageGraph
with multiple roots.
root - A single root, starting point of the storage graph.store - The backing store instance.public byte[] getData(HGPersistentHandle handle)
getData in interface StorageGraphpublic HGPersistentHandle[] getLink(HGPersistentHandle handle)
getLink in interface StorageGraphpublic HGPersistentHandle store(HGPersistentHandle handle, HGPersistentHandle[] link)
store in interface StorageGraphpublic HGPersistentHandle store(HGPersistentHandle handle, byte[] data)
store in interface StorageGraphpublic Set<HGPersistentHandle> getRoots()
StorageGraphReturn the set of root handles for this storage sub-graph.
getRoots in interface StorageGraphpublic Iterator<Pair<HGPersistentHandle,Object>> iterator()
iterator in interface Iterable<Pair<HGPersistentHandle,Object>>iterator in interface StorageGraphCopyright © 2015. All rights reserved.