org.vertx.scala.core

shareddata

package shareddata

Visibility
  1. Public
  2. All

Type Members

  1. final class SharedData extends AnyVal

    Sometimes it is desirable to share immutable data between different event loops, for example to implement a cache of data.

    Sometimes it is desirable to share immutable data between different event loops, for example to implement a cache of data.

    This class allows instances of shared data structures to be looked up and used from different event loops.

    The data structures themselves will only allow certain data types to be stored into them. This shields you from worrying about any thread safety issues might occur if mutable objects were shared between event loops.

    The following types can be stored in a shareddata data structure:

      [[java.lang.String]]
      [[java.lang.Integer]]
      [[java.lang.Long]]
      [[java.lang.Double]]
      [[java.lang.Float]]
      [[java.lang.Short]]
      [[java.lang.Byte]]
      [[java.lang.Character]]
      `byte[]` - this will be automatically copied, and the copy will be stored in the structure.
      [[org.vertx.scala.core.buffer.Buffer]] - this will be automatically copied, and the copy will be stored in the
      structure.
    

    Instances of this class are thread-safe.

Value Members

  1. object SharedData

    Factory for org.vertx.scala.core.shareddata.SharedData instances.

Ungrouped