Class FirstCreateStrategy
- java.lang.Object
-
- org.apache.iotdb.db.wal.allocation.AbstractNodeAllocationStrategy
-
- org.apache.iotdb.db.wal.allocation.FirstCreateStrategy
-
- All Implemented Interfaces:
NodeAllocationStrategy
public class FirstCreateStrategy extends AbstractNodeAllocationStrategy
This strategy creates one wal node for each unique identifier. In other words, each identifier (like data region) has its own wal node.
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.db.wal.allocation.AbstractNodeAllocationStrategy
folderManager
-
-
Constructor Summary
Constructors Constructor Description FirstCreateStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IWALNodeapplyForWALNode(java.lang.String applicantUniqueId)Allocate one wal node for the applicantvoidclear()voiddeleteWALNode(java.lang.String applicantUniqueId)java.util.List<WALNode>getNodesSnapshot()Get all wal nodesvoidregisterWALNode(java.lang.String applicantUniqueId, java.lang.String logDirectory, long startFileVersion, long startSearchIndex)-
Methods inherited from class org.apache.iotdb.db.wal.allocation.AbstractNodeAllocationStrategy
createWALNode, createWALNode, createWALNode
-
-
-
-
Method Detail
-
applyForWALNode
public IWALNode applyForWALNode(java.lang.String applicantUniqueId)
Description copied from interface:NodeAllocationStrategyAllocate one wal node for the applicant
-
registerWALNode
public void registerWALNode(java.lang.String applicantUniqueId, java.lang.String logDirectory, long startFileVersion, long startSearchIndex)
-
deleteWALNode
public void deleteWALNode(java.lang.String applicantUniqueId)
-
getNodesSnapshot
public java.util.List<WALNode> getNodesSnapshot()
Description copied from interface:NodeAllocationStrategyGet all wal nodes
-
clear
public void clear()
-
-