org.magnos.data.store.factory
Class MappedStoreFactory

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

public class MappedStoreFactory
extends java.lang.Object
implements StoreFactory

A factory for creating mapped file stores.

Author:
Philip Diffenderfer

Constructor Summary
MappedStoreFactory()
           
 
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

MappedStoreFactory

public MappedStoreFactory()
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.