Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.ehealth.technicalconnector.cache
Interface Cache<K,V>

All Known Implementing Classes:
  HashMapCache

    public interface Cache<K,V>

A cache is similar to a map or a key value store, allowing to retrieve and update values which are associated to keys.

Method Summary
`void` | `clear()` Clear the cache.
`boolean` | `containsKey(K key)` Returns true, if there is a mapping for the specified key.
`V` | `get(K key)` Returns a value associated by the given key, that contains a non expired value.
`String` | `getName()` A configured or generated name of this cache instance.
`void` | `put(K key, V value)` Updates an existing cache entry for the specified key, so it associates the given value, or, insert a new cache entry for this key and value.
`void` | `putAll(Map<K,V> keystores)`
`void` | `remove(K key)` Removes the mapping for a key from the cache if it is present.

Method Detail

### getName

    String getName()

  A configured or generated name of this cache instance.

  Returns:
    name of this cache or null for anonymous caches.

### get

    V get(K key)

  Returns a value associated by the given key, that contains a non expired value. If no value is present or it is expired the cache loader is invoked, if configured, or `null` is returned.

  Parameters:
    `key` - key with which the specified value is associated
  Returns:
    the value associated with the specified key, or `null` if there was no mapping for the key.

### containsKey

    boolean containsKey(K key)

  Returns true, if there is a mapping for the specified key.

  Parameters:
    `key` - key which association should be checked
  Returns:
    `true`, if this cache contains a mapping for the specified key

### put

    void put(K key,
             V value)

  Updates an existing cache entry for the specified key, so it associates the given value, or, insert a new cache entry for this key and value.

  Parameters:
    `key` - key with which the specified value is associated
    `value` - value to be associated with the specified key

### remove

    void remove(K key)

  Removes the mapping for a key from the cache if it is present.

  Parameters:
    `key` - key which mapping is to be removed from the cache, not null

### clear

    void clear()

  Clear the cache.

### putAll

    void putAll(Map<K,V> keystores)

  Parameters:
    `keystores` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Connector Package PERSMIDWIFE 3.15.1 API
Copyright © {inceptionYear}-2018 eHealth. All Rights Reserved.