gzz.mediaserver.storage
Class TransientStorer

java.lang.Object
  |
  +--gzz.mediaserver.storage.TransientStorer
All Implemented Interfaces:
Storer

public class TransientStorer
extends java.lang.Object
implements Storer

A storer storing everything in memory, not on the disk.


Nested Class Summary
 
Nested classes inherited from class gzz.mediaserver.storage.Storer
Storer.DefaultPropertiesImpl
 
Constructor Summary
TransientStorer()
           
 
Method Summary
 void delete(java.lang.String key)
           
 java.io.File getFile(java.lang.String key)
          Get a file that contains this key.
 java.util.Set getKeys()
           
 java.lang.String getProperty(java.lang.String p)
           
 java.io.InputStream retrieve(java.lang.String key)
           
 void setProperty(java.lang.String name, java.lang.String data)
           
 java.io.OutputStream store(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransientStorer

public TransientStorer()
Method Detail

getKeys

public java.util.Set getKeys()
                      throws java.io.IOException
Specified by:
getKeys in interface Storer
java.io.IOException

retrieve

public java.io.InputStream retrieve(java.lang.String key)
                             throws java.io.IOException
Specified by:
retrieve in interface Storer
java.io.IOException

store

public java.io.OutputStream store(java.lang.String key)
                           throws java.io.IOException
Specified by:
store in interface Storer
java.io.IOException

delete

public void delete(java.lang.String key)
            throws java.io.IOException
Specified by:
delete in interface Storer
java.io.IOException

getFile

public java.io.File getFile(java.lang.String key)
Description copied from interface: Storer
Get a file that contains this key.

Specified by:
getFile in interface Storer
Returns:
A file that contains the content of this file, or null if such a file is not available (for example, the datum is transferred from the network and is not available on a file system.

getProperty

public java.lang.String getProperty(java.lang.String p)
Specified by:
getProperty in interface Storer

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String data)
                 throws java.io.IOException
Specified by:
setProperty in interface Storer
java.io.IOException