public class IsisCacheBackendOnGuava extends Object implements IsisCacheBackend
Modifier and Type | Class and Description |
---|---|
static class |
IsisCacheBackendOnGuava.IsisCacheBackendOnGuavaFactory |
static class |
IsisCacheBackendOnGuava.IsisWeigher |
IsisCacheBackend.Factory
Modifier and Type | Field and Description |
---|---|
protected boolean |
adjusted
if true size of cache has been recomputed
|
protected long |
biggestCached
la plus grosse donnee mis en cache
|
protected long |
biggestStepCached
la plus grosse donnee mis en cache
|
protected com.google.common.cache.Cache<String,Object> |
cache |
static double |
CACHE_STEP
number of time steps to cache by interpolating from the first step
|
static int |
CHAR_SIZE |
static int |
DOUBLE_SIZE |
static IsisCacheBackend.Factory |
factory |
protected IsisCacheBackendOnGuava.IsisWeigher |
isisWeigher |
protected TimeStep |
lastStep
the last step use to put value in cache
|
protected long |
maxCache |
protected long |
maxMemory |
protected long |
numberCached
le total en d'element mis en cache
|
protected long |
numberStepCached
le total en d'element mis en cache
|
static int |
POINTER_SIZE |
protected long |
sizeCache |
protected long |
smallestCached
la plus petite donnee mis en cache
|
protected long |
smallestStepCached
la plus petite donnee mis en cache
|
protected long |
totalCached
le total en octet mis en cache
|
protected long |
totalLastStepCached
le total en octet mis en cache au precedent pas de temps
|
protected long |
totalStepCached
le total en octet mis en cache
|
Constructor and Description |
---|
IsisCacheBackendOnGuava() |
Modifier and Type | Method and Description |
---|---|
void |
addStat(long value) |
void |
addStepStat(long value) |
void |
adjustedCache(long amount)
resizes the cache if amount is not greater than autorized maxCache
|
void |
changeStep()
Previent le cache, qu'on change de TimeStep et qu'il peut faire
du travail s'il en a besoin
|
void |
clear() |
Object |
get(TimeStep step,
String key) |
String |
getStat()
get specific backend cache statistic
|
void |
put(TimeStep step,
String key,
Object value) |
void |
removeStep(Object o) |
public static final int POINTER_SIZE
public static final int DOUBLE_SIZE
public static final int CHAR_SIZE
public static double CACHE_STEP
public static IsisCacheBackend.Factory factory
protected IsisCacheBackendOnGuava.IsisWeigher isisWeigher
protected long maxMemory
protected long maxCache
protected long sizeCache
protected TimeStep lastStep
protected boolean adjusted
protected long totalLastStepCached
protected long numberCached
protected long totalCached
protected long smallestCached
protected long biggestCached
protected long numberStepCached
protected long totalStepCached
protected long smallestStepCached
protected long biggestStepCached
public void addStat(long value)
public void addStepStat(long value)
public void clear()
clear
in interface IsisCacheBackend
public void removeStep(Object o)
removeStep
in interface IsisCacheBackend
public void adjustedCache(long amount)
amount
- new size of cache in bytepublic void changeStep()
public Object get(TimeStep step, String key)
get
in interface IsisCacheBackend
public void put(TimeStep step, String key, Object value)
put
in interface IsisCacheBackend
public String getStat()
IsisCacheBackend
getStat
in interface IsisCacheBackend
Copyright © 1999–2020 CodeLutin. All rights reserved.