public interface Region
Defines a contract for accessing a particular named region within the underlying cache implementation.
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object key)
Determine whether this region contains data for the given key.
|
void |
destroy()
The "end state" contract of the region’s lifecycle.
|
long |
getElementCountInMemory()
The count of entries currently contained in the regions in-memory store.
|
long |
getElementCountOnDisk()
The count of entries currently contained in the regions disk store.
|
String |
getName()
Retrieve the name of this region.
|
long |
getSizeInMemory()
The number of bytes is this cache region currently consuming in memory.
|
int |
getTimeout()
Get a timeout value.
|
long |
nextTimestamp()
Get the next timestamp according to the underlying cache implementor.
|
Map |
toMap()
Get the contents of this region as a map.
|
String getName()
Retrieve the name of this region.
void destroy() throws CacheException
The "end state" contract of the region’s lifecycle. Called
during SessionFactory.close()
to give
the region a chance to cleanup.
CacheException
- Indicates problem shutting downboolean contains(Object key)
Determine whether this region contains data for the given key. <p/> The semantic here is whether the cache contains data visible for the current call context. This should be viewed as a "best effort", meaning blocking should be avoid if possible.
key
- The cache keylong getSizeInMemory()
The number of bytes is this cache region currently consuming in memory.
long getElementCountInMemory()
The count of entries currently contained in the regions in-memory store.
long getElementCountOnDisk()
The count of entries currently contained in the regions disk store.
Map toMap()
Get the contents of this region as a map. <p/> Implementors which do not support this notion should simply return an empty map.
long nextTimestamp()
Get the next timestamp according to the underlying cache implementor.
int getTimeout()
Get a timeout value.
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.