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

Direct Known Subclasses

MRUEntry, NotCachedEntry

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.



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

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.



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

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:

  • (Boolean)


545
546
547
# File 'lib/puppet/environments.rb', line 545

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.



559
560
561
# File 'lib/puppet/environments.rb', line 559

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:

  • (Boolean)


555
556
557
# File 'lib/puppet/environments.rb', line 555

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.



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

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.



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

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.



563
564
565
# File 'lib/puppet/environments.rb', line 563

def unguard
  @guards -= 1
end