Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SMILA/Documentation/ObjectStore/Bundle org.eclipse.smila.objectstore.filesystem

< SMILA‎ | Documentation
Revision as of 04:01, 22 June 2011 by Andreas.schank.attensity.com (Talk | contribs) (New page: = org.eclipse.smila.objectstore.filesystem = <b>(since SMILA 0.9.0)</b> This package provides a file system based implementation of the ObjectStoreService (org.eclipse.smila.objectstore p...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

org.eclipse.smila.objectstore.filesystem

(since SMILA 0.9.0)

This package provides a file system based implementation of the ObjectStoreService (org.eclipse.smila.objectstore package).

The objects are temporarily written to a shadow store, so they won't be visible until they have been committed (an exception to this is the append operation, that will append to the live object).

The storage is divided in two parts: Stores and Objects.

The following rules apply to this filesystem based implementation:

  • Store
    • A store is represented by a plain directory in the base store path.
    • A store can include plain files or a hierarchy of files that can be listed with getStoreObjectInfos(String, String).
    • valid store names can currently contain up to 256 characters, including a-z and A-Z, as well as digits and the hyphen ('-'), (as a regular expression: "[a-zA-Z0-9-]{0,256}").
  • Object
    • An object represents a file in a store.
    • An object will be invisible until the corresponding SimpleStoreOutputStream is closed or an invocation of writeObject(String, String) method succeeded
      • exception: an invocation of the appendToObject(String, String, byte[]) method will append directly to the visible object.

Hierarchies within the store can be created by using object ids that contain a path, e.g. creating an object path/to/the/object in a store with the name storename will result in the following filesystem hierarchy (starting with the store-base filesystem): storename/path/to/the/object


SimpleObjectStoreService

API

SimpleObjectStoreService implements the API of the ObjectStoreService.

This implementation does not support the method void finishObject(final String storeName, final String objectId), that is meant to prevent further append calls for the object. Any call to this method is ignored.

You can find the API of the ObjectStoreService at ObjectStoreService interface.

Configuration

The only configuration that can be provided (but is not necessary) is a configuration property file located at configuration/org.eclipse.smila.objectstore.filesystem/objectstoreservice.properties.

In this file you can specify the following settings:

  • root.path
    • the root path for the object store root directory, in this directory the store root folder objectstore and shadow directory .objectstore will be created to hold the stores and the visible (resp. temporary) objects of the stores.
    • if the property is not set, a default directory for the bundle is created in the SMILA workspace.
  • file.locking
    • this option is experimental!
    • if set to true access to the file will be acompanied by a filesystem lock to prohibit parallel access by other programs. Whether or not the operating system or the file system used will honor this OS filesystem lock cannot be guaranteed, so it is not recommended to use this option.
    • this property defaults to false

Back to the top