equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 " |
3 " |
2 COPYRIGHT (c) 1999 by eXept Software AG |
4 COPYRIGHT (c) 1999 by eXept Software AG |
3 All Rights Reserved |
5 All Rights Reserved |
4 |
6 |
5 This software is furnished under a license and may be used |
7 This software is furnished under a license and may be used |
61 |
63 |
62 [class variables:] |
64 [class variables:] |
63 " |
65 " |
64 ! ! |
66 ! ! |
65 |
67 |
|
68 !CachingRegistry methodsFor:'enumerating'! |
|
69 |
|
70 detect:aBlock ifNone:exceptionValue |
|
71 "... additionaly move it to the front of the LRU chain" |
|
72 |
|
73 keyArray validElementsDo:[:obj | |
|
74 (obj ~~ DeletedEntry and:[aBlock value:obj]) ifTrue:[ |
|
75 keptReferences |
|
76 removeIdentical:obj ifAbsent:[]; |
|
77 addLast:obj. |
|
78 ^ obj |
|
79 ]. |
|
80 ]. |
|
81 ^ exceptionValue value |
|
82 ! ! |
|
83 |
66 !CachingRegistry methodsFor:'private'! |
84 !CachingRegistry methodsFor:'private'! |
67 |
85 |
68 cacheSize:aNumber |
86 cacheSize:aNumber |
69 keptReferences := OrderedCollection new:aNumber. |
87 keptReferences := OrderedCollection new:aNumber. |
70 cacheSize := aNumber. |
88 cacheSize := aNumber. |