org.jboss.metadata.plugins.cache
Interface Cache<K,V>

Type Parameters:
K - exact key type
V - value key type
All Known Implementing Classes:
ConcurrentHashMapCache

public interface Cache<K,V>

Simple cache interface.

Author:
Ales Justin

Method Summary
 void clear()
          Clear node.
 V get(K key)
          Get value under key.
 V put(K key, V value)
          Put value under key.
 V remove(K key)
          Remove value under key.
 

Method Detail

put

V put(K key,
      V value)
Put value under key.

Parameters:
key - the key
value - the value
Returns:
old value if exists

get

V get(K key)
Get value under key.

Parameters:
key - the key
Returns:
old value if exists

remove

V remove(K key)
Remove value under key.

Parameters:
key - the key
Returns:
removed value

clear

void clear()
Clear node.



Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.