public interface IMediaCacheItem
| Modifier and Type | Field | Description |
|---|---|---|
static String |
PROPS_ITEM_LASTMODIFIED |
|
static String |
PROPS_ITEM_LENGTH |
|
static String |
PROPS_ITEM_MEDIANAME |
|
static String |
PROPS_SOURCE_BLOCKSIZE |
|
static String |
PROPS_SOURCE_NAME |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPendingWrites(com.wowza.wms.mediacache.model.MediaCacheBlockPtr blockPtr) |
Add the block to the list of pending writes
|
long |
blockSize() |
Get the block size configured for this item
|
void |
close() |
Close the item
|
void |
decPendingWriteCount() |
Decrement the pending write count
|
boolean |
exists() |
Return if the item exists
|
long |
getBlockCount() |
Get the block count
|
com.wowza.wms.mediacache.model.MediaCacheBlockPtr |
getBlockPtr(long offset,
long length) |
Get a block pointer for the offset and length given
|
long |
getBlockSize() |
Get the block size for the item
|
com.wowza.wms.mediacache.model.MediaCacheItemInfo |
getInfo() |
Get the MediaCacheItemInfo object for this item
|
String |
getLocalPath() |
Get the local path for the item
|
int |
getLockCount() |
Get the current lock count
|
long |
getMaxTimeToLive() |
Get the maximum time to live for the item
|
IMediaCacheSource |
getMediaCacheSource() |
Gets the MediaCache source for the item
|
java.io.File |
getMediaFile() |
Get the file pointed to for this CacheItem
|
String |
getMediaName() |
Get the MediaName for this item
|
long |
getMinTimeToLive() |
Get the minimum time to live for the item
|
long |
getPendingWriteCount() |
Get the pending write count
|
com.wowza.wms.mediacache.model.MediaCacheBlockPtr |
getPendingWrites(long blockId) |
Get the block from the list of pending writes
|
IMediaCacheStoreItem |
getStoreItem() |
Get the store item object for this item
|
IMediaCacheStoreItem |
getStoreItem(boolean doLoad) |
Get the item from the store.
|
edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock |
getSyncLock() |
Get the WMSReadWriteLock object
|
void |
incPendingWriteCount() |
Increment the pending write count
|
boolean |
init(String mediaName,
IMediaCacheStoreItem storeItem) |
Initialize the item
|
boolean |
isBlockInCache(long block) |
Check if the block needed is already cached
|
boolean |
isLocal() |
Return if the item is local
|
boolean |
isReadAheadTrigger(long pos,
int threshold) |
Determine if the read ahead should occur
|
long |
lastModified() |
Get the last modified time of the item
|
long |
length() |
Get the length of the item
|
int |
lock() |
Add to lock count for item
|
long |
posToBlock(long pos) |
Convert the position given into a block number
|
void |
preload() |
Start the readahead system
|
long |
read(com.wowza.wms.mediacache.model.MediaCacheReadContext readContext,
long foffset,
byte[] buffer,
long boffset,
long length) |
Reads data using the read context and returns the byte count read
|
com.wowza.wms.mediacache.model.MediaCacheReadResult |
read(com.wowza.wms.mediacache.model.MediaCacheReadContext readContext,
long foffset,
long length) |
Reads data using the read context and returns a MediaCacheReadResult object
|
void |
readAhead() |
Read ahead for all pending read ahead objects
|
com.wowza.wms.mediacache.model.MediaCacheBlockPtr |
removePendingWrites(long blockId) |
Remove the block from list of pending writes
|
void |
saveBlock(com.wowza.wms.mediacache.model.MediaCacheBlockPtr blockPtr) |
Save the block provided by the block pointer object
|
void |
setLastModified(long lastModified) |
Set the last modified time of the item
|
void |
setLastRelease(long lastRelease) |
Set the last release time of the item
|
void |
setLength(long length) |
Set the length of the item
|
void |
setLocal(boolean isLocal) |
Set if the item is local
|
void |
setLocalPath(String localPath) |
Set the local path for the item
|
void |
setMaxTimeToLive(long maxTimeToLive) |
Set the maximum time to live for the item
|
void |
setMediaCacheSource(IMediaCacheSource mediaCacheSource) |
Sets the MediaCache source for the item
|
void |
setMediaName(String name) |
Set the MediaName for this item
|
void |
setMinTimeToLive(long minTimeToLive) |
Set the minimum time to live for the item
|
void |
tiggerReadAhead(long pos) |
Cause a read ahead
|
int |
unlock() |
Remove from lock count from item
|
boolean |
validate() |
Validate this item
|
boolean |
validate(java.util.Properties props) |
Validate this item with your own properties
|
static final String PROPS_ITEM_LASTMODIFIED
static final String PROPS_ITEM_LENGTH
static final String PROPS_ITEM_MEDIANAME
static final String PROPS_SOURCE_BLOCKSIZE
static final String PROPS_SOURCE_NAME
void addPendingWrites(com.wowza.wms.mediacache.model.MediaCacheBlockPtr blockPtr)
blockPtr - long blockSize()
void close()
void decPendingWriteCount()
boolean exists()
long getBlockCount()
com.wowza.wms.mediacache.model.MediaCacheBlockPtr getBlockPtr(long offset,
long length)
offset - length - long getBlockSize()
com.wowza.wms.mediacache.model.MediaCacheItemInfo getInfo()
String getLocalPath()
int getLockCount()
long getMaxTimeToLive()
IMediaCacheSource getMediaCacheSource()
java.io.File getMediaFile()
String getMediaName()
long getMinTimeToLive()
long getPendingWriteCount()
com.wowza.wms.mediacache.model.MediaCacheBlockPtr getPendingWrites(long blockId)
blockId - IMediaCacheStoreItem getStoreItem()
IMediaCacheStoreItem getStoreItem(boolean doLoad)
doLoad - edu.emory.mathcs.backport.java.util.concurrent.locks.WMSReadWriteLock getSyncLock()
void incPendingWriteCount()
boolean init(String mediaName,
IMediaCacheStoreItem storeItem)
mediaName - storeItem - boolean isBlockInCache(long block)
block - boolean isLocal()
boolean isReadAheadTrigger(long pos,
int threshold)
pos - threshold - long lastModified()
long length()
int lock()
long posToBlock(long pos)
pos - void preload()
long read(com.wowza.wms.mediacache.model.MediaCacheReadContext readContext,
long foffset,
byte[] buffer,
long boffset,
long length)
readContext - foffset - buffer - boffset - length - com.wowza.wms.mediacache.model.MediaCacheReadResult read(com.wowza.wms.mediacache.model.MediaCacheReadContext readContext,
long foffset,
long length)
readContext - foffset - length - void readAhead()
com.wowza.wms.mediacache.model.MediaCacheBlockPtr removePendingWrites(long blockId)
blockId - void saveBlock(com.wowza.wms.mediacache.model.MediaCacheBlockPtr blockPtr)
blockPtr - void setLastModified(long lastModified)
lastModified - void setLastRelease(long lastRelease)
lastRelease - void setLength(long length)
length - void setLocal(boolean isLocal)
isLocal - void setLocalPath(String localPath)
localPath - void setMaxTimeToLive(long maxTimeToLive)
maxTimeToLive - void setMediaCacheSource(IMediaCacheSource mediaCacheSource)
mediaCacheSource - void setMediaName(String name)
name - void setMinTimeToLive(long minTimeToLive)
minTimeToLive - void tiggerReadAhead(long pos)
pos - int unlock()
boolean validate()
boolean validate(java.util.Properties props)
props -