Class Version2
java.lang.Object
io.openems.edge.timedata.rrd4j.version.AbstractVersion
io.openems.edge.timedata.rrd4j.version.Version2
- All Implemented Interfaces:
Version
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.timedata.rrd4j.version.Version
Version.CreateDatabaseConfig
-
Constructor Summary
ConstructorDescriptionVersion2
(org.osgi.service.component.ComponentContext context) Version2
(org.osgi.service.component.ComponentContext context, Version2.StaticConfigurationConstants contants) -
Method Summary
Modifier and TypeMethodDescriptionorg.rrd4j.core.RrdDb
Creates a new database with the givenVersion.CreateDatabaseConfig
.org.rrd4j.core.RrdDb
migrate
(org.rrd4j.core.RrdDb oldDb, Version.CreateDatabaseConfig config) Migrates the old database into a new one by creating a temporary file database of theVersion.CreateDatabaseConfig
.Methods inherited from class io.openems.edge.timedata.rrd4j.version.AbstractVersion
getVersion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.timedata.rrd4j.version.Version
getVersion
-
Constructor Details
-
Version2
public Version2(org.osgi.service.component.ComponentContext context, Version2.StaticConfigurationConstants contants) -
Version2
public Version2(org.osgi.service.component.ComponentContext context)
-
-
Method Details
-
createNewDb
Description copied from interface:Version
Creates a new database with the givenVersion.CreateDatabaseConfig
.- Specified by:
createNewDb
in interfaceVersion
- Parameters:
config
- the configuration to create the database- Returns:
- the created database
- Throws:
IOException
- on I/O-Error
-
migrate
public org.rrd4j.core.RrdDb migrate(org.rrd4j.core.RrdDb oldDb, Version.CreateDatabaseConfig config) throws IOException Description copied from interface:Version
Migrates the old database into a new one by creating a temporary file database of theVersion.CreateDatabaseConfig
.- Specified by:
migrate
in interfaceVersion
- Parameters:
oldDb
- the old database instance of the previous versionconfig
- theVersion.CreateDatabaseConfig
to create a new database- Returns:
- the migrated data in the new database
- Throws:
IOException
- on I/O-Error
-