org.schemarepo
Class BaseRepository
java.lang.Object
org.schemarepo.BaseRepository
- All Implemented Interfaces:
- Closeable, Repository
- Direct Known Subclasses:
- AbstractBackendRepository, DelegatingRepository
public abstract class BaseRepository
- extends Object
- implements Repository
Base class for all repository implementations.
|
Field Summary |
protected boolean |
closed
|
protected org.slf4j.Logger |
logger
|
logger
protected org.slf4j.Logger logger
closed
protected boolean closed
BaseRepository
public BaseRepository()
isValid
public void isValid()
- Asserts the repository is in a valid state (for ex. not closed).
- Throws:
IllegalStateException - if the repository is NOT in a valid state
close
public void close()
throws IOException
- Specified by:
close in interface Closeable
- Throws:
IOException
exposeConfiguration
protected Map<String,String> exposeConfiguration()
- Expose certain configuration elements as properties.
This can be used to construct a useful toString() response, for ex.
Remember to call
super
when overriding!
- Returns:
- Map representing properties; note that the actual implementation may be immutable
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2015. All rights reserved.