public class ExpirationProfile extends Object
| Constructor and Description |
|---|
ExpirationProfile(EnvironmentImpl env) |
ExpirationProfile(ExpirationProfile other)
Make a copy for use in utilities, etc.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCompletedTracker(ExpirationTracker tracker)
Called after a file flip.
|
int |
getExpiredBytes(long fileNum)
Returns the number of expired bytes for the given file.
|
Pair<Integer,Integer> |
getExpiredBytes(long fileNum,
long time)
Returns the number of expired bytes for the given file.
|
void |
populateCache(StartupTracker.Counter counter,
ProgressListener<RecoveryProgress> listener)
Called at the end of recovery to open the expiration DB, and cache its
records in the profile's map.
|
void |
refresh(long time)
Updates the expired bytes in the expiration profile according to the
data that has expired at the given time.
|
String |
toString(long fileNum) |
public ExpirationProfile(EnvironmentImpl env)
public ExpirationProfile(ExpirationProfile other)
public void populateCache(StartupTracker.Counter counter, ProgressListener<RecoveryProgress> listener)
public void addCompletedTracker(ExpirationTracker tracker)
ExpirationTracker.track(int, boolean, int) for some writing
threads. This is because track is not called under the LWL.public void refresh(long time)
Also calls processCompletedTrackers to process any completed trackers by adding them to the DB and to the histogram map.
Should be called periodically (more than once per file written), and
before calling getExpiredBytes(long).
public int getExpiredBytes(long fileNum)
refresh(long).public Pair<Integer,Integer> getExpiredBytes(long fileNum, long time)
refresh(long).
The amount that gradually expires is the amount that expires in the
current time interval, which is one day if all data in the profile
expires on day boundaries, and otherwise is one hour. If this is the
first interval for the file (after a restart or a revisal run), all
expired bytes are considered expired in the current interval and expire
gradually.public String toString(long fileNum)
Copyright © 2024. All rights reserved.