com.esotericsoftware.kryo.ClassResolver Java Examples
The following examples show how to use
com.esotericsoftware.kryo.ClassResolver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KryoCoderProvider.java From beam with Apache License 2.0 | 5 votes |
private <T> boolean hasUserProvidedRegistration(TypeDescriptor<T> typeDescriptor) { final KryoState kryoState = KryoState.get(coder); final Class<? super T> rawType = typeDescriptor.getRawType(); final Kryo kryo = kryoState.getKryo(); final ClassResolver classResolver = kryo.getClassResolver(); final Registration registration = classResolver.getRegistration(rawType); return registration != null && registration.getId() >= kryoState.getFirstRegistrationId(); }