public final class CarPolicy extends Object implements Policy
This implementation is based on the pseudo code provided by the authors in their paper CAR: Clock with Adaptive Replacement and is further described in their paper,
This algorithm is patented by IBM (6996676, 7096321, 7058766, 8612689).
| Constructor and Description |
|---|
CarPolicy(com.typesafe.config.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
finished()
Indicates that the recording has completed.
|
static Set<Policy> |
policies(com.typesafe.config.Config config)
Returns all variations of this policy based on the configuration parameters.
|
void |
record(long key)
Records that the entry was accessed.
|
PolicyStats |
stats()
Returns the cache efficiency statistics.
|
public static Set<Policy> policies(com.typesafe.config.Config config)
public void record(long key)
Policypublic PolicyStats stats()
Policy