Package com.db4o.io
Class StorageDecorator
- java.lang.Object
-
- com.db4o.io.StorageDecorator
-
- All Implemented Interfaces:
Storage
- Direct Known Subclasses:
CachingStorage
,NonFlushingStorage
public class StorageDecorator extends java.lang.Object implements Storage
Wrapper base class for all classes that wrap Storage. Each class that adds functionality to a Storage can extend this class.- See Also:
BinDecorator
-
-
Constructor Summary
Constructors Constructor Description StorageDecorator(Storage storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Bin
decorate(BinConfiguration config, Bin bin)
void
delete(java.lang.String uri)
Deletes the bin for the given URI from the storage.boolean
exists(java.lang.String uri)
returns true if a Bin (file or memory) exists with the passed name.Bin
open(BinConfiguration config)
opens aBin
to store db4o database data.void
rename(java.lang.String oldUri, java.lang.String newUri)
Renames the bin for the given old URI to the new URI.
-
-
-
Field Detail
-
_storage
protected final Storage _storage
-
-
Constructor Detail
-
StorageDecorator
public StorageDecorator(Storage storage)
-
-
Method Detail
-
exists
public boolean exists(java.lang.String uri)
Description copied from interface:Storage
returns true if a Bin (file or memory) exists with the passed name.
-
open
public Bin open(BinConfiguration config) throws Db4oIOException
Description copied from interface:Storage
opens aBin
to store db4o database data.- Specified by:
open
in interfaceStorage
- Throws:
Db4oIOException
-
decorate
protected Bin decorate(BinConfiguration config, Bin bin)
-
delete
public void delete(java.lang.String uri) throws java.io.IOException
Description copied from interface:Storage
Deletes the bin for the given URI from the storage.
-
rename
public void rename(java.lang.String oldUri, java.lang.String newUri) throws java.io.IOException
Description copied from interface:Storage
Renames the bin for the given old URI to the new URI. If a bin for the new URI exists, it will be overwritten.
-
-