Module: Woods::Storage::GraphStore::Interface
- Included in:
- Memory
- Defined in:
- lib/woods/storage/graph_store.rb
Overview
Interface that all graph store adapters must implement.
Instance Method Summary collapse
-
#affected_by(changed_files, max_depth: nil) ⇒ Array<String>
Find all units transitively affected by changes to the given files.
-
#by_type(type) ⇒ Array<String>
Get all units of a specific type.
-
#dependencies_of(identifier) ⇒ Array<String>
Get direct dependencies of a unit.
-
#dependents_of(identifier) ⇒ Array<String>
Get direct dependents of a unit (reverse dependencies).
-
#durable? ⇒ Boolean
Returns true iff this store is the authoritative write target for graph edges and survives process restart.
-
#pagerank(damping: 0.85, iterations: 20) ⇒ Hash<String, Float>
Compute PageRank importance scores for all units.
Instance Method Details
#affected_by(changed_files, max_depth: nil) ⇒ Array<String>
Find all units transitively affected by changes to the given files.
44 45 46 |
# File 'lib/woods/storage/graph_store.rb', line 44 def affected_by(changed_files, max_depth: nil) raise NotImplementedError end |
#by_type(type) ⇒ Array<String>
Get all units of a specific type.
53 54 55 |
# File 'lib/woods/storage/graph_store.rb', line 53 def by_type(type) raise NotImplementedError end |
#dependencies_of(identifier) ⇒ Array<String>
Get direct dependencies of a unit.
25 26 27 |
# File 'lib/woods/storage/graph_store.rb', line 25 def dependencies_of(identifier) raise NotImplementedError end |
#dependents_of(identifier) ⇒ Array<String>
Get direct dependents of a unit (reverse dependencies).
34 35 36 |
# File 'lib/woods/storage/graph_store.rb', line 34 def dependents_of(identifier) raise NotImplementedError end |
#durable? ⇒ Boolean
Returns true iff this store is the authoritative write target for graph edges and survives process restart.
Adapter authors must override this — the default raises so a write-through cache or a partially-persistent adapter can’t be misclassified as ephemeral by omission. Boot-time rehydration from dependency_graph.json is only valid when this returns false; durable backends own their own persistence and must be populated by the extraction/embed write path.
79 80 81 |
# File 'lib/woods/storage/graph_store.rb', line 79 def durable? raise NotImplementedError end |
#pagerank(damping: 0.85, iterations: 20) ⇒ Hash<String, Float>
Compute PageRank importance scores for all units.
63 64 65 |
# File 'lib/woods/storage/graph_store.rb', line 63 def pagerank(damping: 0.85, iterations: 20) raise NotImplementedError end |