Package org.red5.io
Class CachingFileKeyFrameMetaCache
java.lang.Object
org.red5.io.FileKeyFrameMetaCache
org.red5.io.CachingFileKeyFrameMetaCache
- All Implemented Interfaces:
IKeyFrameMetaCache
-
Field Summary
Modifier and TypeFieldDescriptionprivate Map<String,
IKeyFrameDataAnalyzer.KeyFrameMeta> private int
private Random
private ReadWriteLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
loadKeyFrameMeta
(File file) Load keyframe informations for the given file.void
removeKeyFrameMeta
(File file) Remove keyframe information for given file.void
saveKeyFrameMeta
(File file, IKeyFrameDataAnalyzer.KeyFrameMeta meta) Store keyframe informations for the given file.void
setMaxCacheEntry
(int maxCacheEntry)
-
Field Details
-
inMemoryMetaCache
-
rwLock
-
maxCacheEntry
private int maxCacheEntry -
random
-
-
Constructor Details
-
CachingFileKeyFrameMetaCache
public CachingFileKeyFrameMetaCache()
-
-
Method Details
-
freeCachingMetadata
private void freeCachingMetadata() -
loadKeyFrameMeta
Description copied from class:FileKeyFrameMetaCache
Load keyframe informations for the given file.- Specified by:
loadKeyFrameMeta
in interfaceIKeyFrameMetaCache
- Overrides:
loadKeyFrameMeta
in classFileKeyFrameMetaCache
- Parameters:
file
- File to load informations for.- Returns:
- The keyframe informations or
null
if none exist.
-
removeKeyFrameMeta
Description copied from interface:IKeyFrameMetaCache
Remove keyframe information for given file. Need to update keyframe cache when re-writing file.- Specified by:
removeKeyFrameMeta
in interfaceIKeyFrameMetaCache
- Overrides:
removeKeyFrameMeta
in classFileKeyFrameMetaCache
- Parameters:
file
- File to remove information for.
-
saveKeyFrameMeta
Description copied from class:FileKeyFrameMetaCache
Store keyframe informations for the given file.- Specified by:
saveKeyFrameMeta
in interfaceIKeyFrameMetaCache
- Overrides:
saveKeyFrameMeta
in classFileKeyFrameMetaCache
- Parameters:
file
- File to save informations for.meta
- Keyframe informations for this file.
-
setMaxCacheEntry
public void setMaxCacheEntry(int maxCacheEntry)
-