org.magnos.data.store.factory
Class FileStoreFactory

java.lang.Object
  extended by org.magnos.data.store.factory.FileStoreFactory
All Implemented Interfaces:
StoreFactory

public class FileStoreFactory
extends java.lang.Object
implements StoreFactory

A factory for creating file stores.

Author:
Philip Diffenderfer

Constructor Summary
FileStoreFactory()
           
 
Method Summary
 Store create(java.lang.String name)
          Creates a store given its name.
 Store create(java.lang.String name, int capacity)
          Creates a store given its name and desired capacity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStoreFactory

public FileStoreFactory()
Method Detail

create

public Store create(java.lang.String name,
                    int capacity)
Creates a store given its name and desired capacity.

Specified by:
create in interface StoreFactory
Parameters:
name - The name of the store. If the store is persistable this may be the file name to the file to which the store is persisted. If the store is memory based then it is merely a reference.
capacity - The desired capacity of the store in bytes.
Returns:
The reference to a newly instantiated store with the given name.

create

public Store create(java.lang.String name)
Creates a store given its name.

Specified by:
create in interface StoreFactory
Parameters:
name - The name of the store. If the store is persistable this may be the file name to the file to which the store is persisted. If the store is memory based then it is merely a reference.
Returns:
The reference to a newly instantiated store with the given name.