ozone core API

org.ozoneDB.core.storage.gammaStore
Class RandomAccessFileStorageFactory

java.lang.Object
  extended byorg.ozoneDB.core.storage.gammaStore.FileStorageFactory
      extended byorg.ozoneDB.core.storage.gammaStore.RandomAccessFileStorageFactory
All Implemented Interfaces:
PropertyConfigurable, StorageFactory

public class RandomAccessFileStorageFactory
extends FileStorageFactory

Version:
$Id: RandomAccessFileStorageFactory.java,v 1.1 2004/01/02 09:24:38 leomekenkamp Exp $
Author:
Leo Mekenkamp (mind the anti sp@m)

Field Summary
private static java.util.logging.Logger log
           
private  java.lang.String mode
           
static PropertyInfo MODE
           
 
Fields inherited from class org.ozoneDB.core.storage.gammaStore.FileStorageFactory
DIRECTORY, SUBDIRECTORYCOUNT, SUBDIRECTORYDEPTH
 
Constructor Summary
RandomAccessFileStorageFactory(java.util.Properties properties, java.lang.String prefix)
          As prescribed by the PropertyConfigurable interface.
 
Method Summary
 Storage createStorage(java.lang.String name)
          Creates an input stream that is uniquely identified by the specified name.
private  java.lang.String getMode()
           
 java.util.Collection getPropertyInfos()
          Implementing classes should override this method, call super and add their own specific properties.
private  void setMode(java.lang.String mode)
           
 
Methods inherited from class org.ozoneDB.core.storage.gammaStore.FileStorageFactory
delete, deleteAll, ensureParentsExist, getDirectory, getPrefix, nameToFile, nameToFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log

MODE

public static final PropertyInfo MODE

mode

private java.lang.String mode
Constructor Detail

RandomAccessFileStorageFactory

public RandomAccessFileStorageFactory(java.util.Properties properties,
                                      java.lang.String prefix)
As prescribed by the PropertyConfigurable interface.

Method Detail

createStorage

public Storage createStorage(java.lang.String name)
                      throws java.io.IOException
Description copied from interface: StorageFactory

Creates an input stream that is uniquely identified by the specified name. Implementing classes typically have a separate namespace (subdirectory in case of files) for each instance. The name parameter uniquely and inambiguously specifies the exact location to read/write data: this method returns a Storage to the same location if and only if the name is equal.

Note: because it is impossible to know what characters are supported by the specific implementation, one is advised to be conservative in the use of the name parameter; keep it short, use either lowercase or uppercase characters, do not use '+', '-', '&', '>', etc.

Parameters:
name - name of the Storage instance
Throws:
java.io.IOException

getMode

private java.lang.String getMode()

setMode

private void setMode(java.lang.String mode)

getPropertyInfos

public java.util.Collection getPropertyInfos()
Description copied from class: FileStorageFactory
Implementing classes should override this method, call super and add their own specific properties.

Specified by:
getPropertyInfos in interface PropertyConfigurable
Overrides:
getPropertyInfos in class FileStorageFactory

ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.