def fromStorageRepresentation[Offset]()

in core/src/main/scala/org/apache/pekko/projection/internal/OffsetSerialization.scala [75:88]


  def fromStorageRepresentation[Offset](offsetStr: String, manifest: String): Offset =
    (manifest match {
      case StringManifest        => offsetStr
      case LongManifest          => offsetStr.toLong
      case IntManifest           => offsetStr.toInt
      case SequenceManifest      => query.Offset.sequence(offsetStr.toLong)
      case TimeBasedUUIDManifest => query.Offset.timeBasedUUID(UUID.fromString(offsetStr))
      case _ =>
        val parts = manifest.split(':')
        val serializerId = parts(0).toInt
        val serializerManifest = parts(1)
        val bytes = Base64.getDecoder.decode(offsetStr)
        serialization.deserialize(bytes, serializerId, serializerManifest).get
    }).asInstanceOf[Offset]