Package be.bagofwords.db.impl
Class BaseDataInterface<T>
- java.lang.Object
-
- be.bagofwords.db.impl.BaseDataInterface<T>
-
- All Implemented Interfaces:
DataInterface<T>,be.bagofwords.iterator.DataIterable<be.bagofwords.util.KeyValue<T>>,Iterable<be.bagofwords.util.KeyValue<T>>
- Direct Known Subclasses:
CoreDataInterface,LayeredDataInterface,RemoteDataInterface
public abstract class BaseDataInterface<T> extends Object implements DataInterface<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected Combinator<T>combinatorprotected booleanisTemporaryDataInterfaceprotected Stringnameprotected Class<T>objectClassprotected ObjectSerializer<T>objectSerializer
-
Constructor Summary
Constructors Constructor Description BaseDataInterface(String name, Class<T> objectClass, Combinator<T> combinator, ObjectSerializer<T> objectSerializer, boolean isTemporaryDataInterface)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description longapprDataChecksum()voidclose()protected abstract voiddoClose()longexactSize()You don't want to use this if you could use apprSize()protected voidfinalize()Combinator<T>getCombinator()abstract DataInterface<T>getCoreDataInterface()StringgetName()Class<T>getObjectClass()ObjectSerializer<T>getObjectSerializer()voidifNotClosed(Runnable action)booleanisTemporaryDataInterface()booleanwasClosed()-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface be.bagofwords.db.DataInterface
apprSize, cachedValueIterator, dropAllData, flush, increaseCount, increaseCount, increaseCount, increaseCount, iterator, iterator, iterator, iterator, iterator, keyIterator, mightContain, mightContain, optimizeForReading, read, read, read, readCount, readCount, readCount, registerUpdateListener, remove, remove, stream, stream, stream, stream, streamKeys, streamValues, streamValues, streamValues, streamValues, streamValues, valueIterator, valueIterator, valueIterator, valueIterator, valueIterator, write, write, write, write, write
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
combinator
protected final Combinator<T> combinator
-
name
protected final String name
-
isTemporaryDataInterface
protected final boolean isTemporaryDataInterface
-
objectSerializer
protected final ObjectSerializer<T> objectSerializer
-
-
Constructor Detail
-
BaseDataInterface
public BaseDataInterface(String name, Class<T> objectClass, Combinator<T> combinator, ObjectSerializer<T> objectSerializer, boolean isTemporaryDataInterface)
-
-
Method Detail
-
getCoreDataInterface
public abstract DataInterface<T> getCoreDataInterface()
- Specified by:
getCoreDataInterfacein interfaceDataInterface<T>
-
doClose
protected abstract void doClose()
-
getCombinator
public Combinator<T> getCombinator()
- Specified by:
getCombinatorin interfaceDataInterface<T>
-
getObjectSerializer
public ObjectSerializer<T> getObjectSerializer()
- Specified by:
getObjectSerializerin interfaceDataInterface<T>
-
getObjectClass
public Class<T> getObjectClass()
- Specified by:
getObjectClassin interfaceDataInterface<T>
-
getName
public String getName()
- Specified by:
getNamein interfaceDataInterface<T>
-
close
public final void close()
- Specified by:
closein interfaceDataInterface<T>
-
wasClosed
public final boolean wasClosed()
- Specified by:
wasClosedin interfaceDataInterface<T>
-
finalize
protected void finalize() throws Throwable
-
ifNotClosed
public void ifNotClosed(Runnable action)
- Specified by:
ifNotClosedin interfaceDataInterface<T>
-
isTemporaryDataInterface
public boolean isTemporaryDataInterface()
- Specified by:
isTemporaryDataInterfacein interfaceDataInterface<T>
-
apprDataChecksum
public long apprDataChecksum()
- Specified by:
apprDataChecksumin interfaceDataInterface<T>
-
exactSize
public long exactSize()
You don't want to use this if you could use apprSize()- Specified by:
exactSizein interfaceDataInterface<T>
-
-