public class Session<T> extends Object
Constructor and Description |
---|
Session() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear cache.
|
T |
get(long key)
Gets entity from cache (with cache lock).
|
T |
getNoLock(long key)
Gets entity from cache (without cache lock).
|
void |
lock()
Lock cache access.
|
void |
put(long key,
T entity)
Put entity in cache (with cache lock).
|
void |
putNoLock(long key,
T entity)
Put entity in cache (without cache lock).
|
void |
remove(Iterable<Long> keys)
Remote all entities from cache (with cache lock).
|
void |
remove(long key)
Remote entity from cache (with cache lock).
|
void |
unlock()
Unlock cache access.
|
public T get(long key)
key
- entity ids.public T getNoLock(long key)
key
- entity ids.public void put(long key, T entity)
key
- entity ids.entity
- entity.public void putNoLock(long key, T entity)
key
- entity ids.entity
- entity.public void remove(long key)
key
- keypublic void remove(Iterable<Long> keys)
keys
- keyspublic void clear()
public void lock()
public void unlock()
Copyright © 2015. All Rights Reserved.