Class MockImpulseGraphSnapshot
java.lang.Object
org.impulsegraph.vm.MockImpulseGraphSnapshot
- All Implemented Interfaces:
AutoCloseable, ImpulseGraphSnapshot
-
Field Summary
Fields inherited from interface ImpulseGraphSnapshot
MAGIC, SPEC_VERSION_MAJOR, SPEC_VERSION_MINOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidlongReturns the count of queries currently executing against this graph snapshot.Returns a map of all relation snapshots.getDomainName(int domainId) Looks up a domain name by its numeric identifier.Returns the set of all domain names present in this snapshot.longgetEdgeCount(String relationName) Returns the edge count for a specific relation.intReturns the maximum node count across all domains/relations in this snapshot.getMetadata(String key) Returns the value for a custom metadata key, or null if not present.Returns an unmodifiable map of all custom metadata key-value pairs stored in this snapshot.longgetNodeCount(String domainName) Returns the node count for a specific entity/domain type.longReturns the total off-heap memory footprint of this snapshot in bytes.intReturns the total count of relations stored in this snapshot.Returns the set of all relation names present in this snapshot.getRelationSnapshot(int relationId) Obtains theRelationSnapshotfor the given 0-indexed physical relation ID without string allocation or map lookup.getRelationSnapshot(String name) Obtains theRelationSnapshotfor the given relation.getRelationTargetsSegment(String relationName) Obtains the off-heapMemorySegmentfor the given relation's target array.Returns the schema/metadata for a given domain, or null if not present.Returns the SHA-256 checksum hex string calculated over the snapshot sections.withSlot(int slotId, RelationSnapshot rel) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ImpulseGraphSnapshot
awaitDrained, domain, drainAndClose, getDomainAttributeNames, getDomainAttributeSegment, getDomainAttributeSegments, getDomainKeyAttrIndex, getRelationSourceDomainName, getRelationTargetDomainName, isDrained, prepare, traverse, traverse
-
Constructor Details
-
MockImpulseGraphSnapshot
-
-
Method Details
-
withSlot
-
getRelationSnapshot
Description copied from interface:ImpulseGraphSnapshotObtains theRelationSnapshotfor the given 0-indexed physical relation ID without string allocation or map lookup.- Specified by:
getRelationSnapshotin interfaceImpulseGraphSnapshot
-
getMaxNodeCount
public int getMaxNodeCount()Description copied from interface:ImpulseGraphSnapshotReturns the maximum node count across all domains/relations in this snapshot.- Specified by:
getMaxNodeCountin interfaceImpulseGraphSnapshot
-
getRelationSnapshot
Description copied from interface:ImpulseGraphSnapshotObtains theRelationSnapshotfor the given relation.- Specified by:
getRelationSnapshotin interfaceImpulseGraphSnapshot
-
getAllRelationSnapshots
Description copied from interface:ImpulseGraphSnapshotReturns a map of all relation snapshots.- Specified by:
getAllRelationSnapshotsin interfaceImpulseGraphSnapshot
-
getOffHeapMemorySizeBytes
public long getOffHeapMemorySizeBytes()Description copied from interface:ImpulseGraphSnapshotReturns the total off-heap memory footprint of this snapshot in bytes.- Specified by:
getOffHeapMemorySizeBytesin interfaceImpulseGraphSnapshot
-
getRelationCount
public int getRelationCount()Description copied from interface:ImpulseGraphSnapshotReturns the total count of relations stored in this snapshot.- Specified by:
getRelationCountin interfaceImpulseGraphSnapshot
-
getActiveQueryCount
public long getActiveQueryCount()Description copied from interface:ImpulseGraphSnapshotReturns the count of queries currently executing against this graph snapshot.- Specified by:
getActiveQueryCountin interfaceImpulseGraphSnapshot
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceImpulseGraphSnapshot
-
enterQuery
public void enterQuery()- Specified by:
enterQueryin interfaceImpulseGraphSnapshot
-
exitQuery
public void exitQuery()- Specified by:
exitQueryin interfaceImpulseGraphSnapshot
-
getMetadata
Description copied from interface:ImpulseGraphSnapshotReturns the value for a custom metadata key, or null if not present.- Specified by:
getMetadatain interfaceImpulseGraphSnapshot
-
getSha256Checksum
Description copied from interface:ImpulseGraphSnapshotReturns the SHA-256 checksum hex string calculated over the snapshot sections.- Specified by:
getSha256Checksumin interfaceImpulseGraphSnapshot
-
getRelationTargetsSegment
Description copied from interface:ImpulseGraphSnapshotObtains the off-heapMemorySegmentfor the given relation's target array.- Specified by:
getRelationTargetsSegmentin interfaceImpulseGraphSnapshot
-
getRelationNames
Description copied from interface:ImpulseGraphSnapshotReturns the set of all relation names present in this snapshot.- Specified by:
getRelationNamesin interfaceImpulseGraphSnapshot
-
getNodeCount
Description copied from interface:ImpulseGraphSnapshotReturns the node count for a specific entity/domain type.- Specified by:
getNodeCountin interfaceImpulseGraphSnapshot
-
getEdgeCount
Description copied from interface:ImpulseGraphSnapshotReturns the edge count for a specific relation.- Specified by:
getEdgeCountin interfaceImpulseGraphSnapshot
-
getDomainNames
Description copied from interface:ImpulseGraphSnapshotReturns the set of all domain names present in this snapshot.- Specified by:
getDomainNamesin interfaceImpulseGraphSnapshot
-
getDomainName
Description copied from interface:ImpulseGraphSnapshotLooks up a domain name by its numeric identifier.- Specified by:
getDomainNamein interfaceImpulseGraphSnapshot- Returns:
- the domain name, or null if not found
-
getSchema
Description copied from interface:ImpulseGraphSnapshotReturns the schema/metadata for a given domain, or null if not present.- Specified by:
getSchemain interfaceImpulseGraphSnapshot
-
getGraphStatistics
- Specified by:
getGraphStatisticsin interfaceImpulseGraphSnapshot
-
getMetadataMap
Description copied from interface:ImpulseGraphSnapshotReturns an unmodifiable map of all custom metadata key-value pairs stored in this snapshot.- Specified by:
getMetadataMapin interfaceImpulseGraphSnapshot
-