org.neo4j.kernel.impl.cache
Class NoCache<K,V>

java.lang.Object
  extended by org.neo4j.kernel.impl.cache.NoCache<K,V>
All Implemented Interfaces:
Cache<K,V>

public class NoCache<K,V>
extends Object
implements Cache<K,V>


Constructor Summary
NoCache(String name)
           
 
Method Summary
 void clear()
          Removing all cached elements.
 void elementCleaned(V value)
           
 V get(K key)
          Returns the cached element for key.
 String getName()
          Returns the name of the cache.
 long hitCount()
           
 boolean isAdaptive()
           
 int maxSize()
           
 long missCount()
           
 void put(K key, V value)
          Adds element to cache.
 void putAll(Map<K,V> map)
           
 V remove(K key)
          Removes the element for key from cache and returns it.
 void resize(int newSize)
           
 void setAdaptiveStatus(boolean status)
           
 int size()
          Returns the cache size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoCache

public NoCache(String name)
Method Detail

put

public void put(K key,
                V value)
Description copied from interface: Cache
Adds element to cache.

Specified by:
put in interface Cache<K,V>
Parameters:
key - the key for the element

putAll

public void putAll(Map<K,V> map)
Specified by:
putAll in interface Cache<K,V>

get

public V get(K key)
Description copied from interface: Cache
Returns the cached element for key. If the element isn't in cache null is returned.

Specified by:
get in interface Cache<K,V>
Parameters:
key - the key for the element
Returns:
the cached element or null if element didn't exist

remove

public V remove(K key)
Description copied from interface: Cache
Removes the element for key from cache and returns it. If the no element for key exists null is returned.

Specified by:
remove in interface Cache<K,V>
Parameters:
key - the key for the element
Returns:
the removed element or null if element didn't exist

hitCount

public long hitCount()
Specified by:
hitCount in interface Cache<K,V>

missCount

public long missCount()
Specified by:
missCount in interface Cache<K,V>

size

public int size()
Description copied from interface: Cache
Returns the cache size.

Specified by:
size in interface Cache<K,V>
Returns:
cache size

clear

public void clear()
Description copied from interface: Cache
Removing all cached elements.

Specified by:
clear in interface Cache<K,V>

elementCleaned

public void elementCleaned(V value)
Specified by:
elementCleaned in interface Cache<K,V>

getName

public String getName()
Description copied from interface: Cache
Returns the name of the cache.

Specified by:
getName in interface Cache<K,V>
Returns:
name of the cache

isAdaptive

public boolean isAdaptive()
Specified by:
isAdaptive in interface Cache<K,V>

maxSize

public int maxSize()
Specified by:
maxSize in interface Cache<K,V>

resize

public void resize(int newSize)
Specified by:
resize in interface Cache<K,V>

setAdaptiveStatus

public void setAdaptiveStatus(boolean status)
Specified by:
setAdaptiveStatus in interface Cache<K,V>


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.