public abstract class AbstractUniqueIndex<P> extends Index<P>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractUniqueIndex(java.util.List<IndexKey> keys,
boolean sparse) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Document document,
P position,
MongoCollection<P> collection) |
boolean |
canHandle(Document query) |
void |
checkAdd(Document document,
MongoCollection<P> collection) |
void |
checkUpdate(Document oldDocument,
Document newDocument,
MongoCollection<P> collection) |
protected boolean |
containsKey(KeyValue keyValue) |
protected abstract java.lang.Iterable<java.util.Map.Entry<KeyValue,P>> |
getIterable() |
protected abstract P |
getPosition(KeyValue keyValue) |
java.lang.Iterable<P> |
getPositions(Document query) |
protected abstract boolean |
putKeyPosition(KeyValue keyValue,
P position) |
P |
remove(Document document) |
protected abstract P |
removeDocument(KeyValue keyValue) |
void |
updateInPlace(Document oldDocument,
Document newDocument,
MongoCollection<P> collection) |
getCount, getDataSize, getKeys, getName, isCompoundIndex, isEmpty, isSparse, keys, keySet, nullAwareEqualsKeysprotected AbstractUniqueIndex(java.util.List<IndexKey> keys, boolean sparse)
protected boolean containsKey(KeyValue keyValue)
public void checkAdd(Document document, MongoCollection<P> collection)
public void add(Document document, P position, MongoCollection<P> collection)
public void checkUpdate(Document oldDocument, Document newDocument, MongoCollection<P> collection)
checkUpdate in class Index<P>public void updateInPlace(Document oldDocument, Document newDocument, MongoCollection<P> collection) throws KeyConstraintError
updateInPlace in class Index<P>KeyConstraintErrorpublic java.lang.Iterable<P> getPositions(Document query)
getPositions in class Index<P>