E
- The type of entity to cache.public interface PSEntityCache<E extends PSEntity>
Modifier and Type | Method and Description |
---|---|
E |
get(E entity)
Retrieve the object in the cache from an instance.
|
E |
get(Long id)
Retrieve the object in the cache for the specified ID.
|
E |
get(String key)
Retrieve the object in the cache for the specified key.
|
Long |
getVersion(String key)
Return the version of the element for the specified key.
|
void |
put(E entity)
Put a new element in the underlying cache.
|
void |
remove(String key)
Removes the element.
|
void |
removeAll()
Remove all cache entries.
|
void put(E entity)
entity
- The entity to cache.E get(Long id)
id
- The ID of the entitynull
if the ID or element is null
E get(String key)
key
- The keynull
if the key or element is null
E get(E entity)
entity
- The entitynull
if the key or element is null
Long getVersion(String key)
key
- The keynull
if the key or element is null
void remove(String key)
key
- the key of the element to remove.void removeAll()
Copyright © 2016 Allette Systems. All rights reserved.