Class: Legion::Transport::InProcess::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/transport/in_process.rb

Instance Method Summary collapse

Constructor Details

#initializeSession

Returns a new instance of Session.



17
18
19
# File 'lib/legion/transport/in_process.rb', line 17

def initialize
  @open = false
end

Instance Method Details

#after_recovery_attempts_exhaustedObject



50
# File 'lib/legion/transport/in_process.rb', line 50

def after_recovery_attempts_exhausted(&); end

#after_recovery_completedObject



48
# File 'lib/legion/transport/in_process.rb', line 48

def after_recovery_completed(&); end

#closeObject



35
36
37
38
# File 'lib/legion/transport/in_process.rb', line 35

def close
  @open = false
  Legion::Transport::Local.reset!
end

#closed?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/legion/transport/in_process.rb', line 31

def closed?
  !@open
end

#create_channel(_id = nil, _pool_size = 1) ⇒ Object



40
41
42
# File 'lib/legion/transport/in_process.rb', line 40

def create_channel(_id = nil, _pool_size = 1, **)
  Channel.new
end

#on_blockedObject



44
# File 'lib/legion/transport/in_process.rb', line 44

def on_blocked(&); end

#on_unblockedObject



46
# File 'lib/legion/transport/in_process.rb', line 46

def on_unblocked(&); end

#open?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/legion/transport/in_process.rb', line 27

def open?
  @open
end

#startObject



21
22
23
24
25
# File 'lib/legion/transport/in_process.rb', line 21

def start
  @open = true
  Legion::Transport::Local.setup
  self
end