Module: Pacer

Defined in:
lib/pacer-titan.rb,
lib/pacer-titan/graph.rb,
lib/pacer-titan/version.rb,
lib/pacer-titan/titan_query.rb,
lib/pacer-titan/external_index_query.rb

Defined Under Namespace

Modules: Filter, Titan

Class Method Summary collapse

Class Method Details

.executing_route(route) ⇒ Object



33
34
35
# File 'lib/pacer-titan.rb', line 33

def executing_route(route)
  Rails.logger.debug "Pacer Titan executing route: #{route.description}" if defined? Rails
end

.titan(path = "config/inmemory.properties") ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/pacer-titan.rb', line 14

def titan(path="config/inmemory.properties")      
  open = proc do
    graph = Pacer.open_graphs[path]
    unless graph
      args = [java.lang.String.java_class]
      graph = com.thinkaurelius.titan.core.TitanFactory.java_send(:open, args, path)
      Pacer.open_graphs[path] = graph
    end
    graph
  end
  
  shutdown = proc do |graph|
    graph.blueprints_graph.shutdown
    Pacer.open_graphs.delete path
  end

  Titan::Graph.new(Pacer::YamlEncoder, open, shutdown)
end