Interface InitialisableAccessMode

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface InitialisableAccessMode
    AccessMode specialisation for those modes that need some kind of initialisation.
    Since:
    1.5
    Author:
    Andrea Gazzarini
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flushChangeSet()
      Flushes pending changesets.
      java.util.Map<java.lang.String,​java.util.List<java.util.Map<java.lang.String,​java.lang.Object>>> getChanges​(long version)  
      long getLastCommittedVersion()
      Returns the last persisted content store version.
      void init()
      Initialises this access mode instance.
      void removeDocFromContentStore​(org.alfresco.solr.client.NodeMetaData nodeMetaData)
      Removes a node from the content store.
      void setLastCommittedVersion​(long version)
      Persists the last committed version on the hosting node.
      void storeDocOnSolrContentStore​(java.lang.String tenant, long dbId, org.apache.solr.common.SolrInputDocument doc)
      Stores a SolrInputDocument into Alfresco solr content store.
      void storeDocOnSolrContentStore​(org.alfresco.solr.client.NodeMetaData nodeMetaData, org.apache.solr.common.SolrInputDocument doc)
      Stores a SolrInputDocument into Alfresco solr content store.
      void switchOnReadOnlyMode()
      Tries to transition from this mode to the readOnlyMode.
      void switchOnReadWriteMode()
      Tries to transition from this mode to the read/write mode.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • init

        void init()
        Initialises this access mode instance.
      • getLastCommittedVersion

        long getLastCommittedVersion()
        Returns the last persisted content store version.
        Returns:
        the last persisted content store version, SolrContentStore#NO_VERSION_AVAILABLE in case the version isn't available.
      • setLastCommittedVersion

        void setLastCommittedVersion​(long version)
        Persists the last committed version on the hosting node. Note that this is tipically valid only on slave node, because the master already manages the content store version on a persistent storage, so it doesn't need to call this method.
        Parameters:
        version - the last committed content store version.
      • getChanges

        java.util.Map<java.lang.String,​java.util.List<java.util.Map<java.lang.String,​java.lang.Object>>> getChanges​(long version)
      • storeDocOnSolrContentStore

        void storeDocOnSolrContentStore​(java.lang.String tenant,
                                        long dbId,
                                        org.apache.solr.common.SolrInputDocument doc)
        Stores a SolrInputDocument into Alfresco solr content store.
        Parameters:
        tenant - the owning tenant.
        dbId - the document DBID
        doc - the document itself.
      • storeDocOnSolrContentStore

        void storeDocOnSolrContentStore​(org.alfresco.solr.client.NodeMetaData nodeMetaData,
                                        org.apache.solr.common.SolrInputDocument doc)
        Stores a SolrInputDocument into Alfresco solr content store.
        Parameters:
        nodeMetaData - the node metadata.
        doc - the document itself.
      • removeDocFromContentStore

        void removeDocFromContentStore​(org.alfresco.solr.client.NodeMetaData nodeMetaData)
        Removes a node from the content store.
        Parameters:
        nodeMetaData - the node metadata.
      • flushChangeSet

        void flushChangeSet()
                     throws java.io.IOException
        Flushes pending changesets.
        Throws:
        java.io.IOException - in case of I/O failure.
      • switchOnReadOnlyMode

        void switchOnReadOnlyMode()
        Tries to transition from this mode to the readOnlyMode.
      • switchOnReadWriteMode

        void switchOnReadWriteMode()
        Tries to transition from this mode to the read/write mode.