Class KryoClassListRegistrar

java.lang.Object
org.springframework.integration.codec.kryo.AbstractKryoRegistrar
org.springframework.integration.codec.kryo.KryoClassListRegistrar
All Implemented Interfaces:
KryoRegistrar

public class KryoClassListRegistrar extends AbstractKryoRegistrar
A KryoRegistrar used to validateRegistration a list of Java classes. This assigns a sequential registration ID starting with an initial value (50 by default), but may be configured. This is easiest to set up but requires that every server node be configured with the identical list in the same order.
Since:
4.2
Author:
David Turanski, Artem Bilan
  • Constructor Details

    • KryoClassListRegistrar

      public KryoClassListRegistrar(Class<?>... classes)
      Parameters:
      classes - the vararg of classes to validateRegistration
    • KryoClassListRegistrar

      public KryoClassListRegistrar(List<Class<?>> classes)
      Parameters:
      classes - the list of classes to validateRegistration
  • Method Details

    • setInitialValue

      public void setInitialValue(int initialValue)
      Set the initial ID value. Classes in the list will be sequentially assigned an ID starting with this value (default is 50).
      Parameters:
      initialValue - the initial value
    • getRegistrations

      public List<com.esotericsoftware.kryo.Registration> getRegistrations()
      Returns:
      the list of Registration provided