final class ConfigDb extends AnyRef
In-memory representation of a configuration DB content.
Use ConfigDb.apply or ConfigDb.open to create an instance of it.
set, setFromString, and remove only change values in memory.
Use save to persist values on disk.
- Alphabetic
- By Inheritance
- ConfigDb
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def dump: Array[Byte]
Dumps this DB content as JSON
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get[T](key: Key[T]): Either[ConfigDbFormatError, Option[T]]
Gets an entry.
Gets an entry.
If the value cannot be decoded, an error is returned on the left side of the either.
If the key isn't in DB, None is returned on the right side of the either.
Else, the value is returned wrapped in Some on the right side of the either.
- def getAsString[T](key: Key[T]): Either[ConfigDbFormatError, Option[Seq[String]]]
Gets an entry in printable form.
Gets an entry in printable form.
See get for when a left value, or a None on the right, can be returned.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- var rawEntries: Map[String, Array[Byte]]
- def remove(key: Key[_]): ConfigDb.this.type
Removes an entry from memory
- def save(path: Path): Either[Exception, Unit]
Saves this DB at the passed path
- def saveUnsafe(path: Path): Either[ConfigDbPermissionsError, Unit]
- def set[T](key: Key[T], value: T): ConfigDb.this.type
Sets an entry in memory
- def setFromString[T](key: Key[T], values: Seq[String]): Either[MalformedValue, ConfigDb.this.type]
Sets an entry in memory, from a printable / user-writable representation.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()