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
  • Field Summary

    Fields inherited from class org.springframework.integration.codec.kryo.AbstractKryoRegistrar

    KRYO, log

    Fields inherited from interface org.springframework.integration.codec.kryo.KryoRegistrar

    MIN_REGISTRATION_VALUE
  • Constructor Summary

    Constructors 
    Constructor Description
    KryoClassListRegistrar​(java.lang.Class<?>... classes)  
    KryoClassListRegistrar​(java.util.List<java.lang.Class<?>> classes)  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<com.esotericsoftware.kryo.Registration> getRegistrations()  
    void setInitialValue​(int initialValue)
    Set the initial ID value.

    Methods inherited from class org.springframework.integration.codec.kryo.AbstractKryoRegistrar

    registerTypes

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KryoClassListRegistrar

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

      public KryoClassListRegistrar​(java.util.List<java.lang.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 java.util.List<com.esotericsoftware.kryo.Registration> getRegistrations()
      Returns:
      the list of Registration provided