io.altoo.serialization.kryo.scala.DefaultQueueBuilder.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-kryo-serialization_2.12 Show documentation
Show all versions of scala-kryo-serialization_2.12 Show documentation
pekko-serialization implementation using kryo - core implementation
The newest version!
package io.altoo.serialization.kryo.scala
import org.agrona.concurrent.ManyToManyConcurrentArrayQueue
import java.util
import scala.reflect.ClassTag
/**
* Default queue builder that can be extended to use another type of queue.
* Notice that it must be a multiple producer and multiple consumer queue type,
* you could use for example a bounded non-blocking queue.
*/
class DefaultQueueBuilder {
/**
* Override to use a different queue.
*/
def build[T: ClassTag]: util.Queue[T] = new ManyToManyConcurrentArrayQueue[T](Runtime.getRuntime.availableProcessors * 4)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy