![JAR search and dependency download from the Maven repository](/logo.png)
org.mapdb.volume.ReadOnlyVolumeFactory.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapdb Show documentation
Show all versions of mapdb Show documentation
MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap memory. It is a fast, scalable and easy to use embedded Java database.
package org.mapdb.volume
/**
* Wraps volume factory and returns volume as readonly
*/
class ReadOnlyVolumeFactory(protected val volfab:VolumeFactory): VolumeFactory() {
override fun exists(file: String?): Boolean {
return volfab.exists(file)
}
override fun makeVolume(file: String?, readOnly: Boolean, fileLockWait:Long, sliceShift: Int, initSize: Long, fixedSize: Boolean): Volume? {
val volume = volfab.makeVolume(file, readOnly, fileLockWait, sliceShift, initSize, fixedSize)
return ReadOnlyVolume(volume)
}
override fun handlesReadonly(): Boolean {
return true
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy