public class ContentRevisionCache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ContentRevisionCache.UniqueType |
Constructor and Description |
---|
ContentRevisionCache() |
Modifier and Type | Method and Description |
---|---|
static void |
checkContentsSize(java.lang.String path,
long size) |
void |
clearAll() |
void |
clearAllCurrent() |
void |
clearConstantCache() |
void |
clearCurrent(java.util.Set<java.lang.String> paths) |
void |
clearScope(java.util.List<? extends VcsDirtyScope> scopes) |
static java.lang.String |
getAsString(byte [] bytes,
FilePath file,
java.nio.charset.Charset charset) |
byte [] |
getBytes(FilePath path,
VcsRevisionNumber number,
VcsKey vcsKey,
ContentRevisionCache.UniqueType type) |
byte[] |
getFromConstantCache(FilePath path,
VcsRevisionNumber revisionNumber,
VcsKey vcsKey,
ContentRevisionCache.UniqueType type) |
static byte [] |
getOrLoadAsBytes(Project project,
FilePath path,
VcsRevisionNumber number,
VcsKey vcsKey,
ContentRevisionCache.UniqueType type,
Throwable2Computable<byte [],? extends VcsException,? extends java.io.IOException> loader) |
static java.lang.String |
getOrLoadAsString(Project project,
FilePath path,
VcsRevisionNumber number,
VcsKey vcsKey,
ContentRevisionCache.UniqueType type,
Throwable2Computable<byte[],? extends VcsException,? extends java.io.IOException> loader) |
static java.lang.String |
getOrLoadAsString(Project project,
FilePath file,
VcsRevisionNumber number,
VcsKey key,
ContentRevisionCache.UniqueType type,
Throwable2Computable<byte[],? extends VcsException,? extends java.io.IOException> loader,
java.nio.charset.Charset charset) |
static Pair<VcsRevisionNumber,byte[]> |
getOrLoadCurrentAsBytes(Project project,
FilePath path,
VcsKey vcsKey,
CurrentRevisionProvider loader) |
void |
putIntoConstantCache(FilePath path,
VcsRevisionNumber revisionNumber,
VcsKey vcsKey,
byte[] content) |
public void clearAllCurrent()
public void clearScope(java.util.List<? extends VcsDirtyScope> scopes)
public void clearCurrent(java.util.Set<java.lang.String> paths)
public static java.lang.String getAsString(byte [] bytes, FilePath file, java.nio.charset.Charset charset)
public static java.lang.String getOrLoadAsString(Project project, FilePath file, VcsRevisionNumber number, VcsKey key, ContentRevisionCache.UniqueType type, Throwable2Computable<byte[],? extends VcsException,? extends java.io.IOException> loader, java.nio.charset.Charset charset) throws VcsException, java.io.IOException
VcsException
java.io.IOException
public static java.lang.String getOrLoadAsString(Project project, FilePath path, VcsRevisionNumber number, VcsKey vcsKey, ContentRevisionCache.UniqueType type, Throwable2Computable<byte[],? extends VcsException,? extends java.io.IOException> loader) throws VcsException, java.io.IOException
VcsException
java.io.IOException
public byte [] getBytes(FilePath path, VcsRevisionNumber number, VcsKey vcsKey, ContentRevisionCache.UniqueType type)
public static byte [] getOrLoadAsBytes(Project project, FilePath path, VcsRevisionNumber number, VcsKey vcsKey, ContentRevisionCache.UniqueType type, Throwable2Computable<byte [],? extends VcsException,? extends java.io.IOException> loader) throws VcsException, java.io.IOException
VcsException
java.io.IOException
public static void checkContentsSize(java.lang.String path, long size) throws VcsException
VcsException
public void putIntoConstantCache(FilePath path, VcsRevisionNumber revisionNumber, VcsKey vcsKey, byte[] content)
public byte[] getFromConstantCache(FilePath path, VcsRevisionNumber revisionNumber, VcsKey vcsKey, ContentRevisionCache.UniqueType type)
public void clearConstantCache()
public static Pair<VcsRevisionNumber,byte[]> getOrLoadCurrentAsBytes(Project project, FilePath path, VcsKey vcsKey, CurrentRevisionProvider loader) throws VcsException, java.io.IOException
VcsException
java.io.IOException
public void clearAll()