Class: Puppet::Environments::Cached::Entry Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/environments.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Never evicting entry

API:

  • private

Direct Known Subclasses

NotCachedEntry, TTLEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Entry

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Entry.

API:

  • private



531
532
533
534
# File 'lib/puppet/environments.rb', line 531

def initialize(value)
  @value = value
  @guards = 0
end

Instance Attribute Details

#valueObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



529
530
531
# File 'lib/puppet/environments.rb', line 529

def value
  @value
end

Instance Method Details

#expired?(now) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



539
540
541
# File 'lib/puppet/environments.rb', line 539

def expired?(now)
  false
end

#guardObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



553
554
555
# File 'lib/puppet/environments.rb', line 553

def guard
  @guards += 1
end

#guarded?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

These are not protected with a lock, because all of the Cached methods are protected.

Returns:

API:

  • private



549
550
551
# File 'lib/puppet/environments.rb', line 549

def guarded?
  @guards > 0
end

#labelObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



543
544
545
# File 'lib/puppet/environments.rb', line 543

def label
  ""
end

#touchObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



536
537
# File 'lib/puppet/environments.rb', line 536

def touch
end

#unguardObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



557
558
559
# File 'lib/puppet/environments.rb', line 557

def unguard
  @guards -= 1
end