class Map[K, V] extends MapStream[K, V]
Key-value or Map database API.
For documentation check - http://swaydb.io/api/
- Alphabetic
- By Inheritance
- Map
- MapStream
- Serializable
- Serializable
- Product
- Equals
- Streamable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Map(mapKey: Seq[K], map: swaydb.Map[Key[K], Option[V], ApiIO])(implicit keySerializer: Serializer[K], mapKeySerializer: Serializer[Key[K]], keyOrder: KeyOrder[Slice[Byte]], valueSerializerOption: Serializer[Option[V]], valueSerializer: Serializer[V])
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
-
def
after(key: K): MapStream[K, V]
- Definition Classes
- MapStream
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
before(key: K): MapStream[K, V]
- Definition Classes
- MapStream
-
def
clear(): ApiIO[Done]
Removes all key-values from the current Map.
Removes all key-values from the current Map. SubMaps and subMap's key-values or not altered.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def closeDatabase(): ApiIO[Unit]
- def commit(prepare: Iterable[Prepare[K, V]]): ApiIO[Done]
- def commit(entries: Prepare[MapEntry[K], Option[V]]*): ApiIO[Done]
- def commitPrepared(prepare: Prepare[K, V]*): ApiIO[Done]
- def contains(key: K): ApiIO[Boolean]
-
def
drop(count: Int): Stream[(K, V), ApiIO]
- Definition Classes
- MapStream → Streamable
-
def
dropWhile(f: ((K, V)) ⇒ Boolean): Stream[(K, V), ApiIO]
- Definition Classes
- MapStream → Streamable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def exists(): ApiIO[Boolean]
- def expiration(key: K): ApiIO[Option[Deadline]]
- def expire(keys: Iterable[(K, Deadline)]): ApiIO[Done]
- def expire(keys: (K, Deadline)*): ApiIO[Done]
- def expire(from: K, to: K, at: Deadline): ApiIO[Done]
- def expire(from: K, to: K, after: FiniteDuration): ApiIO[Done]
- def expire(key: K, at: Deadline): ApiIO[Done]
- def expire(key: K, after: FiniteDuration): ApiIO[Done]
-
def
filter(f: ((K, V)) ⇒ Boolean): Stream[(K, V), ApiIO]
- Definition Classes
- MapStream → Streamable
-
def
filterNot(f: ((K, V)) ⇒ Boolean): Stream[(K, V), ApiIO]
- Definition Classes
- MapStream → Streamable
-
def
flatMap[B](f: ((K, V)) ⇒ Stream[B, ApiIO]): Stream[B, ApiIO]
- Definition Classes
- MapStream → Streamable
-
def
foldLeft[B](initial: B)(f: (B, (K, V)) ⇒ B): ApiIO[B]
- Definition Classes
- MapStream → Streamable
-
def
foreach[U](f: ((K, V)) ⇒ U): Stream[Unit, ApiIO]
- Definition Classes
- MapStream → Streamable
-
def
from(key: K): MapStream[K, V]
- Definition Classes
- MapStream
-
def
fromOrAfter(key: K): MapStream[K, V]
- Definition Classes
- MapStream
-
def
fromOrBefore(key: K): MapStream[K, V]
- Definition Classes
- MapStream
-
def
get(key: K): ApiIO[Option[V]]
Returns target value for the input key.
Returns target value for the input key.
- returns
Returns None is the key does not exist.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getKey(key: K): ApiIO[Option[K]]
Returns target full key for the input partial key.
Returns target full key for the input partial key.
This function is mostly used for Set databases where partial ordering on the Key is provided.
- def getKeyValue(key: K): ApiIO[Option[(K, V)]]
-
def
getValue(): ApiIO[Option[V]]
Returns None if the map does not exist or returns the value.
-
def
headOption: ApiIO[Option[(K, V)]]
- Definition Classes
- MapStream → Streamable
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isReverse: Boolean
- Definition Classes
- MapStream
- def keySize(key: K): Int
- def keys: MapKeysStream[K]
-
def
lastOption: ApiIO[Option[(K, V)]]
lastOption should always force formKey to be the endSubMapsKey because from is always set in swaydb.extensions.Maps and regardless from where the iteration starts the most efficient way to fetch the last is from the key endSubMapsKey.
lastOption should always force formKey to be the endSubMapsKey because from is always set in swaydb.extensions.Maps and regardless from where the iteration starts the most efficient way to fetch the last is from the key endSubMapsKey.
- Definition Classes
- MapStream → Streamable
- def level0Meter: LevelZeroMeter
- def levelMeter(levelNumber: Int): Option[LevelMeter]
-
def
map[B](f: ((K, V)) ⇒ B): Stream[B, ApiIO]
- Definition Classes
- MapStream → Streamable
-
val
map: swaydb.Map[Key[K], Option[V], ApiIO]
- Definition Classes
- MapStream
-
val
mapKey: Seq[K]
- Definition Classes
- MapStream
- def maps: Maps[K, V]
-
val
mapsOnly: Boolean
- Definition Classes
- MapStream
- def mightContain(key: K): ApiIO[Boolean]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def preparePut(key: K, value: V, deadline: Deadline): Prepare[MapEntry[K], Option[V]]
- def preparePut(key: K, value: V, expireAfter: FiniteDuration): Prepare[MapEntry[K], Option[V]]
- def preparePut(key: K, value: V): Prepare[MapEntry[K], Option[V]]
- def prepareRemove(from: K, to: K): Prepare[MapEntry[K], Option[V]]
- def prepareRemove(key: K): Prepare[MapEntry[K], Option[V]]
- def put(keyValues: Iterable[(K, V)]): ApiIO[Done]
- def put(keyValues: (K, V)*): ApiIO[Done]
- def put(key: K, value: V, expireAt: Deadline): ApiIO[Done]
- def put(key: K, value: V, expireAfter: FiniteDuration): ApiIO[Done]
- def put(key: K, value: V): ApiIO[Done]
- def remove(keys: Iterable[K]): ApiIO[Done]
- def remove(keys: K*): ApiIO[Done]
- def remove(from: K, to: K): ApiIO[Done]
- def remove(key: K): ApiIO[Done]
-
def
reverse: MapStream[K, V]
Returns the start key when doing reverse iteration.
Returns the start key when doing reverse iteration.
If subMaps are included then it will return the starting point to be Key.SubMapsEnd which will iterate backward until Key.MapEntriesStart else returns the starting point to be Key.MapEntriesEnd to fetch entries only.
- Definition Classes
- MapStream
- def size: ApiIO[Int]
- def sizeOfSegments: Long
-
def
stream: Stream[(K, V), ApiIO]
- Definition Classes
- MapStream
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
take(count: Int): Stream[(K, V), ApiIO]
- Definition Classes
- MapStream → Streamable
-
def
takeWhile(f: ((K, V)) ⇒ Boolean): Stream[(K, V), ApiIO]
- Definition Classes
- MapStream → Streamable
- def timeLeft(key: K): ApiIO[Option[FiniteDuration]]
-
def
toString(): String
- Definition Classes
- MapStream → AnyRef → Any
- def update(keyValues: Iterable[(K, V)]): ApiIO[Done]
- def update(keyValues: (K, V)*): ApiIO[Done]
- def update(from: K, to: K, value: V): ApiIO[Done]
- def update(key: K, value: V): ApiIO[Done]
- def updateValue(value: V): ApiIO[Map[K, V]]
-
val
userDefinedFrom: Boolean
- Definition Classes
- MapStream
- def valueSize(value: V): Int
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.