Sha256: 9a647322649e1eee622988abc570ebf1a41efbd6b9d75f44abb92f067568c3da

Contents?: true

Size: 1.07 KB

Versions: 7

Compression:

Stored size: 1.07 KB

Contents

module Mack
  module Distributed
    module Routes
      # A class used to house the Mack::Routes::Url module for distributed applications.
      # Functionally this class does nothing, but since you can't cache a module, a class is needed.
      class Urls
        include DRbUndumped
        
        def initialize(dsd) # :nodoc:
          @dsd = dsd
        end
        
        def put
          Mack::Distributed::Utils::Rinda.register_or_renew(:space => app_config.mack.distributed_app_name.to_sym, 
                                                            :klass_def => :distributed_routes, 
                                                            :object => self, :timeout => 0)
        end
        
        def run(meth, options)
          self.send(meth, options)
        end
        
        class << self
          
          def get(app_name)
            Mack::Distributed::Utils::Rinda.read(:space => app_name.to_sym, :klass_def => :distributed_routes)
          end
          
        end
        
      end # Urls
      
    end # Routes
  end # Distributed
end # Mack

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mack-0.5.5.1 lib/distributed/routing/urls.rb
mack-0.5.5.2 lib/distributed/routing/urls.rb
mack-0.5.5.3 lib/distributed/routing/urls.rb
mack-0.5.5.4 lib/distributed/routing/urls.rb
mack-0.5.5 lib/distributed/routing/urls.rb
mack-0.6.0.1 lib/distributed/routing/urls.rb
mack-0.6.0 lib/distributed/routing/urls.rb