Class Overview
A lightweight implementation of the Cache interface
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.hibernate.cache.Cache
abstract
void
|
clear()
Clear the cache
|
abstract
void
|
destroy()
Clean up
|
abstract
Object
|
get(Object key)
Get an item from the cache, nontransactionally
|
abstract
long
|
getElementCountInMemory()
The count of entries currently contained in the regions in-memory store.
|
abstract
long
|
getElementCountOnDisk()
The count of entries currently contained in the regions disk store.
|
abstract
String
|
getRegionName()
Get the name of the cache region
|
abstract
long
|
getSizeInMemory()
The number of bytes is this cache region currently consuming in memory.
|
abstract
int
|
getTimeout()
Get a reasonable "lock timeout"
|
abstract
void
|
lock(Object key)
If this is a clustered cache, lock the item
|
abstract
long
|
nextTimestamp()
Generate a timestamp
|
abstract
void
|
put(Object key, Object value)
Add an item to the cache, nontransactionally, with
failfast semantics
|
abstract
Object
|
read(Object key)
Get an item from the cache
|
abstract
void
|
remove(Object key)
Remove an item from the cache
|
abstract
Map
|
toMap()
optional operation
|
abstract
void
|
unlock(Object key)
If this is a clustered cache, unlock the item
|
abstract
void
|
update(Object key, Object value)
Add an item to the cache
|
|
Public Constructors
public
HashtableCache
(String regionName)
Public Methods
Get an item from the cache, nontransactionally
Returns
- the cached object or null
public
long
getElementCountInMemory
()
The count of entries currently contained in the regions in-memory store.
Returns
- The count of entries in memory; -1 if unknown or unsupported.
public
long
getElementCountOnDisk
()
The count of entries currently contained in the regions disk store.
Returns
- The count of entries on disk; -1 if unknown or unsupported.
public
String
getRegionName
()
Get the name of the cache region
public
long
getSizeInMemory
()
The number of bytes is this cache region currently consuming in memory.
Returns
- The number of bytes consumed by this region; -1 if unknown or
unsupported.
public
int
getTimeout
()
Get a reasonable "lock timeout"
public
void
lock
(Object key)
If this is a clustered cache, lock the item
public
long
nextTimestamp
()
public
void
put
(Object key, Object value)
Add an item to the cache, nontransactionally, with
failfast semantics
Get an item from the cache
Returns
- the cached object or null
public
void
remove
(Object key)
Remove an item from the cache
public
void
unlock
(Object key)
If this is a clustered cache, unlock the item