public static class DefaultLocalMediaFileCacheService.MediaCacheUnit extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_UNIT_WEIGHT_IN_KB |
| Constructor and Description |
|---|
MediaCacheUnit(File cachedFile) |
| Modifier and Type | Method and Description |
|---|---|
static int |
convertNumBytesToCacheUnitWeight(long numBytes) |
File |
getFile()
This method returns direct cached File instance.
|
InputStream |
getStream() |
int |
getWeight() |
boolean |
isCachedFileExists() |
void |
markResourceAsEvicted() |
protected void |
releaseUsageAndRemoveIfMarked() |
protected void |
removeResource()
Removes resource without any checks.
|
String |
toString() |
void |
tryRemoveResourceOrWriteEvictedMarker() |
public static final int MIN_UNIT_WEIGHT_IN_KB
public MediaCacheUnit(File cachedFile)
public boolean isCachedFileExists()
public File getFile()
public InputStream getStream()
public void markResourceAsEvicted()
protected void releaseUsageAndRemoveIfMarked()
public void tryRemoveResourceOrWriteEvictedMarker()
protected void removeResource()
public int getWeight()
public static int convertNumBytesToCacheUnitWeight(long numBytes)
Copyright © 2017 SAP SE. All Rights Reserved.