Package org.alfresco.solr.content
Interface InitialisableAccessMode
-
- All Superinterfaces:
AutoCloseable,Closeable
public interface InitialisableAccessModeAccessModespecialisation 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 voidflushChangeSet()Flushes pending changesets.Map<String,List<Map<String,Object>>>getChanges(long version)longgetLastCommittedVersion()Returns the last persisted content store version.voidinit()Initialises this access mode instance.voidremoveDocFromContentStore(org.alfresco.solr.client.NodeMetaData nodeMetaData)Removes a node from the content store.voidsetLastCommittedVersion(long version)Persists the last committed version on the hosting node.voidstoreDocOnSolrContentStore(String tenant, long dbId, org.apache.solr.common.SolrInputDocument doc)Stores aSolrInputDocumentinto Alfresco solr content store.voidstoreDocOnSolrContentStore(org.alfresco.solr.client.NodeMetaData nodeMetaData, org.apache.solr.common.SolrInputDocument doc)Stores aSolrInputDocumentinto Alfresco solr content store.voidswitchOnReadOnlyMode()Tries to transition from this mode to the readOnlyMode.voidswitchOnReadWriteMode()Tries to transition from this mode to the read/write mode.
-
-
-
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.
-
storeDocOnSolrContentStore
void storeDocOnSolrContentStore(String tenant, long dbId, org.apache.solr.common.SolrInputDocument doc)
Stores aSolrInputDocumentinto Alfresco solr content store.- Parameters:
tenant- the owning tenant.dbId- the document DBIDdoc- the document itself.
-
storeDocOnSolrContentStore
void storeDocOnSolrContentStore(org.alfresco.solr.client.NodeMetaData nodeMetaData, org.apache.solr.common.SolrInputDocument doc)Stores aSolrInputDocumentinto 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 IOExceptionFlushes pending changesets.- Throws:
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.
-
-