Class Puppet::Indirector::Indirection
In: lib/puppet/indirector/indirection.rb
Parent: Object

The class that connects functional classes with their different collection back-ends. Each indirection has a set of associated terminus classes, each of which is a subclass of Puppet::Indirector::Terminus.

Methods

Included Modules

Puppet::Util::Cacher Puppet::Util::Docs

Attributes

cache_class  [R] 
model  [RW] 
name  [RW] 
terminus_setting  [RW]  This can be used to select the terminus class.

Public Class methods

Find an indirection by name. This is provided so that Terminus classes can specifically hook up with the indirections they are associated with.

Return a list of all known indirections. Used to generate the reference.

Find an indirected model by name. This is provided so that Terminus classes can specifically hook up with the indirections they are associated with.

Public Instance methods

Create and return our cache terminus.

Should we use a cache?

Define a terminus class to be used for caching.

This is only used for testing.

Remove something via the terminus.

Generate the full doc string.

Calculate the expiration date for a returned instance.

Expire a cached object, if one is cached. Note that we don‘t actually remove it, we expire it and write it back out to disk. This way people can still use the expired object if they want.

Search for an instance in the appropriate terminus, caching the results if caching is configured..

Save the instance in the appropriate terminus. This method is normally an instance method on the indirected class.

Search for more than one instance. Should always return an array.

Return the singleton terminus for this indirection.

Determine the terminus class.

Specify the terminus class to use.

Default to the runinterval for the ttl.

Set the time-to-live for instances created through this indirection.

[Validate]