class Orchestrate::Application::PrimaryKey

Class PrimaryKey

Attributes

events[R]
graphs[R]
ref[RW]

Public Class Methods

new(ref) click to toggle source
# File rails/lib/orchestrate_application/simple_cache_store.rb, line 9
def initialize(ref)
  # puts "SCC-primary_key: '#{ref}'"
  @ref = ref
  @events, @graphs = {}, {}
end

Public Instance Methods

add_event(etype, ref=nil) click to toggle source
# File rails/lib/orchestrate_application/simple_cache_store.rb, line 15
def add_event(etype, ref=nil)
  # puts "SCC-add event"
  @events[etype] = [] unless @events[etype]
  @events[etype] << ref if ref
  # puts "SCC-added event"
end
add_graph(data) click to toggle source
# File rails/lib/orchestrate_application/simple_cache_store.rb, line 22
def add_graph(data)
  # puts "SCC-add graph: '#{data.kind}'"
  @graphs[data.kind] = [] unless @graphs[data.kind]
  @graphs[data.kind] << data.ref if data.ref
  # puts "SCC-added graph '#{@graphs[data.kind].last}'"
end