org.tranche.meta
Class MetaDataCache

java.lang.Object
  extended by org.tranche.meta.MetaDataCache

public class MetaDataCache
extends java.lang.Object

Author:
James "Augie" Hill - augman85@gmail.com

Field Summary
static int DEFAULT_SIZE_LIMIT
           
 
Method Summary
static boolean contains(BigHash hash)
           
static MetaData get(BigHash hash)
          Returns a clone of the meta data with the given hash.
static MetaData get(BigHash hash, boolean downloadIfNotPresent)
           
static MetaData get(BigHash hash, boolean downloadIfNotPresent, java.util.Collection<java.lang.String> serversHosts)
           
static int getSizeLimit()
           
static void set(BigHash hash, MetaData metaData)
           
static void setSizeLimit(int sizeLimit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SIZE_LIMIT

public static final int DEFAULT_SIZE_LIMIT
See Also:
Constant Field Values
Method Detail

set

public static void set(BigHash hash,
                       MetaData metaData)
Parameters:
hash -
metaData -

get

public static MetaData get(BigHash hash)

Returns a clone of the meta data with the given hash.

Parameters:
hash -
Returns:

get

public static MetaData get(BigHash hash,
                           boolean downloadIfNotPresent)
Parameters:
hash -
downloadIfNotPresent -
Returns:

get

public static MetaData get(BigHash hash,
                           boolean downloadIfNotPresent,
                           java.util.Collection<java.lang.String> serversHosts)
Parameters:
hash -
downloadIfNotPresent -
Returns:

contains

public static boolean contains(BigHash hash)
Parameters:
hash -
Returns:

setSizeLimit

public static void setSizeLimit(int sizeLimit)
Parameters:
sizeLimit -

getSizeLimit

public static int getSizeLimit()
Returns:


This code is free for use both commercially and non-commercially as stated in the project's license