org.magnos.data
Interface StoreFactory

All Known Implementing Classes:
FileStoreFactory, MappedStoreFactory, MemoryStoreFactory

public interface StoreFactory

A factory for creating stores given their name and their desired capacity.

Author:
Philip Diffenderfer

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.
 

Method Detail

create

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

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

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

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.