Class: Pione::RuleEngine::DataFinder

Inherits:
Object
  • Object
show all
Includes:
TupleSpace::TupleSpaceInterface
Defined in:
lib/pione/rule-engine/data-finder.rb

Overview

DataFinder finds data tuples from tuple space server.

Instance Method Summary collapse

Methods included from TupleSpace::TupleSpaceInterface

#process_log, #processing_error, #set_tuple_space, tuple_space_operation, #tuple_space_server, #with_process_log

Constructor Details

#initialize(space, domain_id) ⇒ DataFinder

Creates a new finder.



8
9
10
11
# File 'lib/pione/rule-engine/data-finder.rb', line 8

def initialize(space, domain_id)
  set_tuple_space(space)
  @domain_id = domain_id
end

Instance Method Details

#find(type, conditions, env, &b) ⇒ Object

Find data tuple combinations from tuple space server. This method calls the block when the combination found.



15
16
17
# File 'lib/pione/rule-engine/data-finder.rb', line 15

def find(type, conditions, env, &b)
  find_next(type, 1, conditions, env, [], &b)
end