Class Index<P>

java.lang.Object
de.bwaldvogel.mongo.backend.Index<P>
Direct Known Subclasses:
AbstractUniqueIndex, EmptyIndex

public abstract class Index<P> extends Object
  • Constructor Details

  • Method Details

    • isSparse

      protected boolean isSparse()
    • getKeys

      public List<IndexKey> getKeys()
    • hasSameOptions

      public boolean hasSameOptions(Index<?> other)
    • getName

      public String getName()
    • keys

      protected List<String> keys()
    • keySet

      protected Set<String> keySet()
    • getKeyValues

      public Set<KeyValue> getKeyValues(Document document)
    • getPosition

      public abstract P getPosition(Document document)
    • checkAdd

      public abstract void checkAdd(Document document, MongoCollection<P> collection)
    • add

      public abstract void add(Document document, P position, MongoCollection<P> collection)
    • remove

      public abstract P remove(Document document)
    • canHandle

      public abstract boolean canHandle(Document query)
    • getPositions

      public abstract Iterable<P> getPositions(Document query)
    • getCount

      public abstract long getCount()
    • isEmpty

      public boolean isEmpty()
    • getDataSize

      public abstract long getDataSize()
    • checkUpdate

      public abstract void checkUpdate(Document oldDocument, Document newDocument, MongoCollection<P> collection)
    • updateInPlace

      public abstract void updateInPlace(Document oldDocument, Document newDocument, P position, MongoCollection<P> collection) throws KeyConstraintError
      Throws:
      KeyConstraintError
    • isCompoundIndex

      protected boolean isCompoundIndex()
    • nullAwareEqualsKeys

      protected boolean nullAwareEqualsKeys(Document oldDocument, Document newDocument)
    • drop

      public abstract void drop()
    • toString

      public String toString()
      Overrides:
      toString in class Object