hudson.plugins.active_directory
Class Cache<K,V,E extends Exception>

java.lang.Object
  extended by hudson.plugins.active_directory.Cache<K,V,E>

public abstract class Cache<K,V,E extends Exception>
extends Object

Cache. Can't use Guava because Jenkins up to 1.463 bundles Guava 9 where cache is beta (and indeed there was a signature change)

Author:
Kohsuke Kawaguchi

Constructor Summary
Cache()
           
 
Method Summary
protected abstract  V compute(K key)
          Computes the value for the given key.
 V get(K key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache

public Cache()
Method Detail

get

public V get(K key)
      throws E extends Exception
Throws:
E extends Exception

compute

protected abstract V compute(K key)
                      throws E extends Exception
Computes the value for the given key.

Returns:
If this method returns normally, the result is cached, even if it is null.
Throws:
E - To abort the cache computation. Exception is not cached.
E extends Exception


Copyright © 2004-2013. All Rights Reserved.