Class SimpleFileVersionController
- java.lang.Object
-
- org.apache.iotdb.db.engine.version.SimpleFileVersionController
-
- All Implemented Interfaces:
VersionController
public class SimpleFileVersionController extends java.lang.Object implements VersionController
SimpleFileVersionController uses a local file and its file name to store the version.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFILE_PREFIXstatic java.lang.StringUPGRADE_DIR
-
Constructor Summary
Constructors Constructor Description SimpleFileVersionController(java.lang.String directoryPath)only used for upgradingSimpleFileVersionController(java.lang.String directoryPath, long timePartitionId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longcurrVersion()Test only method, no need for concurrency.static longgetSaveInterval()longgetTimePartitionId()longnextVersion()Get the next version number.static voidsetSaveInterval(long saveInterval)voidsetTimePartitionId(long timePartitionId)
-
-
-
Field Detail
-
FILE_PREFIX
public static final java.lang.String FILE_PREFIX
- See Also:
- Constant Field Values
-
UPGRADE_DIR
public static final java.lang.String UPGRADE_DIR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleFileVersionController
public SimpleFileVersionController(java.lang.String directoryPath, long timePartitionId) throws java.io.IOException- Throws:
java.io.IOException
-
SimpleFileVersionController
public SimpleFileVersionController(java.lang.String directoryPath) throws java.io.IOExceptiononly used for upgrading- Throws:
java.io.IOException
-
-
Method Detail
-
getSaveInterval
public static long getSaveInterval()
-
setSaveInterval
public static void setSaveInterval(long saveInterval)
-
getTimePartitionId
public long getTimePartitionId()
-
setTimePartitionId
public void setTimePartitionId(long timePartitionId)
-
nextVersion
public long nextVersion()
Description copied from interface:VersionControllerGet the next version number.- Specified by:
nextVersionin interfaceVersionController- Returns:
- the next version number.
-
currVersion
public long currVersion()
Test only method, no need for concurrency.- Specified by:
currVersionin interfaceVersionController- Returns:
- the current version.
-
-