Class: Backstage::Pool
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Resource
#association_chain, #available_actions, included, #resource, #to_hash
#app, #app_name, #name, #status
Methods included from HasMBean
#<=>, #full_name, included, #initialize, #mbean_info, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Backstage::HasMBean
Class Method Details
23
24
25
|
# File 'lib/pools/models/pool.rb', line 23
def self.filter
"torquebox.pools:*"
end
|
.to_hash_attributes ⇒ Object
27
28
29
|
# File 'lib/pools/models/pool.rb', line 27
def self.to_hash_attributes
super + [:name, :app, :app_name, :pool_type, :size, :available, :borrowed, :minimum_instances, :maximum_instances]
end
|
Instance Method Details
#pool_type ⇒ Object
41
42
43
|
# File 'lib/pools/models/pool.rb', line 41
def pool_type
mbean_info.getClassName =~ /Shared/ ? 'shared' : 'default'
end
|
#shared? ⇒ Boolean
45
46
47
|
# File 'lib/pools/models/pool.rb', line 45
def shared?
pool_type == 'shared'
end
|
31
32
33
|
# File 'lib/pools/models/pool.rb', line 31
def size
shared? ? 1 : mbean.size
end
|