public class LRUAnnotator extends Object implements BlockAnnotator<LRUAnnotator.LRUSortedField>
BlockAnnotator
implementation of LRU scheme.Modifier and Type | Class and Description |
---|---|
protected class |
LRUAnnotator.LRUSortedField
Sorted-field for LRU.
|
BlockAnnotator.Factory
Constructor and Description |
---|
LRUAnnotator()
Creates a new LRU annotator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isOnlineSorter()
LRU is an online scheme.
|
BlockSortedField |
updateSortedField(long blockId,
LRUAnnotator.LRUSortedField oldValue)
Used to get a new sorted-field for the given block
at the current logical time.
|
void |
updateSortedFields(List<Pair<Long,LRUAnnotator.LRUSortedField>> blocks)
Updates sorted-field values for all {block-id, sorted-field} pairs
at the same logical time.
|
public BlockSortedField updateSortedField(long blockId, LRUAnnotator.LRUSortedField oldValue)
BlockAnnotator
updateSortedField
in interface BlockAnnotator<LRUAnnotator.LRUSortedField>
blockId
- block IdoldValue
- old sorted-field valuepublic void updateSortedFields(List<Pair<Long,LRUAnnotator.LRUSortedField>> blocks)
BlockAnnotator
updateSortedFields
in interface BlockAnnotator<LRUAnnotator.LRUSortedField>
blocks
- list of {block-id, sorted-field} pairspublic boolean isOnlineSorter()
isOnlineSorter
in interface BlockAnnotator<LRUAnnotator.LRUSortedField>
true
Copyright © 2023. All Rights Reserved.