eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CacheDictionaryWithLimitedLifetime::ArrayWithLimitedLiveTime':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ArrayWithLimitedLiveTime (private in CacheDictionaryWithLimitedLifetime

This class is only visible from within CacheDictionaryWithLimitedLifetime.

Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--ArrayedCollection
            |
            +--Array
               |
               +--CacheDictionaryWithLimitedLifetime::ArrayWithLimitedLiveTime

Package:
stx:libbasic2
Category:
Collections-Unordered
Owner:
CacheDictionaryWithLimitedLifetime

Description:


I remember a timestamp of when slots where changed.

Example:

|a|

a := self new:10.
a at:1 put:'hello'.
Transcript showCR:( a timestampAt:1).
Delay waitForSeconds:0.5.
a at:1 put:'world'.
Transcript showCR:( a timestampAt:1).


Class protocol:

instance creation
o  new: size
(comment from inherited method)
return an instance of myself with anInteger indexed variables.
Redefined here to save a few cycles when executed.
(Since this is often called, its worth giving it an extra ilc-slot.
Future versions of stc will do this automatically.)


Instance protocol:

accessing
o  basicAt: index
(comment from inherited method)
return the indexed instance variable with index, anInteger
- added here for speed

o  basicAt: index put: aValue
(comment from inherited method)
store the 2nd arg, anObject as indexed instvar with index, anInteger.
Returns anObject (sigh).
- added here for speed

o  deathTimestampAt: index

o  liveTime

o  liveTime: aTimeDuration
Modified (format): / 27-10-2020 / 17:39:41 / exept MBP

o  resetDeathTimeAt: index

initialization
o  initializeTimeArray

queries
o  isEntryStillAlive: idx



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 03:10:45 GMT