Parent

Methods

Class Index [+]

Quicksearch

TaskJuggler::DataCacheEntry

These are the entries in the DataCache. They store a value and an access counter. The counter can be read and written externally.

Attributes

hits[RW]

Public Class Methods

new(value) click to toggle source

Create a new DataCacheEntry for the value. The access counter is set to 1 to increase the chance that it is not flushed immedidate.

    # File lib/taskjuggler/DataCache.rb, line 27
27:     def initialize(value)
28:       @value = value
29:       @hits = 1
30:     end

Public Instance Methods

value() click to toggle source

Return the value and increase the access counter by 1.

    # File lib/taskjuggler/DataCache.rb, line 33
33:     def value
34:       if @hits <= 0
35:         @hits = 1
36:       else
37:         @hits += 1
38:       end
39:       @value
40:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.