com.atlassian.plugin.cache.filecache
Interface FileCache<K>

Type Parameters:
K - Key of the cache, should conform the requirements for keys of Map.
All Known Implementing Classes:
FileCacheImpl, PassThroughFileCache

public interface FileCache<K>

Represents a file cache.

Since:
2.13

Method Summary
 void clear()
          Remove all entries in the cache.
 void stream(K key, OutputStream dest, FileCacheStreamProvider input)
          Stream the contents identified by the key to the destination stream.
 

Method Detail

stream

void stream(K key,
            OutputStream dest,
            FileCacheStreamProvider input)
            throws DownloadException
Stream the contents identified by the key to the destination stream. Should the contents not exist in the cache a new entry should be created if the implementation is a caching implementation.

Parameters:
key - can not be null
dest - where to write the cached item to
input - provides the underlying item on a cache-miss
Throws:
DownloadException - if there was an error writing to dest, or reading from input, or reading from the cache

clear

void clear()
Remove all entries in the cache.



Copyright © 2013 Atlassian. All Rights Reserved.