org.tranche.project
Class ProjectFileCache

java.lang.Object
  extended by org.tranche.project.ProjectFileCache

public class ProjectFileCache
extends java.lang.Object

Author:
James "Augie" Hill - augie@828producotions.com

Field Summary
static int DEFAULT_SIZE_LIMIT
           
 
Method Summary
static boolean contains(BigHash hash)
           
static ProjectFile get(BigHash hash)
          Returns the project file with the given hash.
static ProjectFile get(BigHash hash, boolean downloadIfNotPresent)
           
static ProjectFile get(BigHash hash, boolean downloadIfNotPresent, java.util.Collection<java.lang.String> serversHosts)
           
static ProjectFile get(BigHash hash, boolean downloadIfNotPresent, java.lang.String passphrase)
           
static ProjectFile get(BigHash hash, boolean downloadIfNotPresent, java.lang.String passphrase, java.util.Collection<java.lang.String> serversHosts)
           
static int getSizeLimit()
           
static void set(BigHash hash, ProjectFile projectFile)
           
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,
                       ProjectFile projectFile)
Parameters:
hash -
projectFile -

get

public static ProjectFile get(BigHash hash)

Returns the project file with the given hash.

Parameters:
hash -
Returns:

get

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

get

public static ProjectFile get(BigHash hash,
                              boolean downloadIfNotPresent,
                              java.lang.String passphrase)
Parameters:
hash -
downloadIfNotPresent -
passphrase -
Returns:

get

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

get

public static ProjectFile get(BigHash hash,
                              boolean downloadIfNotPresent,
                              java.lang.String passphrase,
                              java.util.Collection<java.lang.String> serversHosts)
Parameters:
hash -
downloadIfNotPresent -
serversHosts -
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