Interface FullGcNodeBin

  • All Known Implementing Classes:
    MongoFullGcNodeBin

    public interface FullGcNodeBin
    This class is as a wrapper around DocumentStore that expose two methods used to clean garbage from NODES collection public int remove(Map orphanOrDeletedRemovalMap) public List findAndUpdate(List updateOpList) When enabled Each method saves the document ID or empty properties names (that will be deleted) to a separate _bin collection as a BinDocument then delegates deletion to DocumentStore When disabled (default) Each method delegates directly to DocumentStore
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<NodeDocument> findAndUpdate​(List<UpdateOp> updateOpList)
      Performs a conditional update If the bin is enabled, the removed properties are saved to the SETTINGS collection with ID prefixed with '/bin/' and empty value If the document ID and properties cannot be saved then the removal of the property fails If bin is disabled, the removed properties are directly removed from the NODES collection
      static FullGcNodeBin noBin​(DocumentStore store)  
      int remove​(Map<String,​Long> orphanOrDeletedRemovalMap)
      Remove orphaned or deleted documents from the NODES collection If bin is enabled, the document IDs are saved to the SETTINGS collection with ID prefixed with '/bin/' If document ID cannot be saved then the removal of the document fails If the bin is disabled, the document IDs are directly removed from the NODES collection
      void setEnabled​(boolean value)
      Enable or disable the bin
    • Method Detail

      • remove

        int remove​(Map<String,​Long> orphanOrDeletedRemovalMap)
        Remove orphaned or deleted documents from the NODES collection If bin is enabled, the document IDs are saved to the SETTINGS collection with ID prefixed with '/bin/' If document ID cannot be saved then the removal of the document fails If the bin is disabled, the document IDs are directly removed from the NODES collection
        Parameters:
        orphanOrDeletedRemovalMap - the keys of the documents to remove with the corresponding timestamps
        Returns:
        the number of documents removed
        See Also:
        DocumentStore.remove(Collection, Map)
      • findAndUpdate

        List<NodeDocument> findAndUpdate​(List<UpdateOp> updateOpList)
        Performs a conditional update If the bin is enabled, the removed properties are saved to the SETTINGS collection with ID prefixed with '/bin/' and empty value If the document ID and properties cannot be saved then the removal of the property fails If bin is disabled, the removed properties are directly removed from the NODES collection
        Parameters:
        updateOpList - the update operation List
        Returns:
        the list containing old documents
        See Also:
        DocumentStore.findAndUpdate(Collection, List)
      • setEnabled

        void setEnabled​(boolean value)
        Enable or disable the bin
        Parameters:
        value - true to enable, false to disable