@SuppressWarnings("unchecked") @Override protected void restoreKeyAndNamespaceSerializers( InternalTimersSnapshot<K, N> restoredTimersSnapshot, DataInputView in) throws IOException { List<Tuple2<TypeSerializer<?>, TypeSerializerSnapshot<?>>> serializersAndConfigs = TypeSerializerSerializationUtil.readSerializersAndConfigsWithResilience(in, userCodeClassLoader); restoredTimersSnapshot.setKeySerializer((TypeSerializer<K>) serializersAndConfigs.get(0).f0); restoredTimersSnapshot.setKeySerializerConfigSnapshot((TypeSerializerSnapshot<K>) serializersAndConfigs.get(0).f1); restoredTimersSnapshot.setNamespaceSerializer((TypeSerializer<N>) serializersAndConfigs.get(1).f0); restoredTimersSnapshot.setNamespaceSerializerConfigSnapshot((TypeSerializerSnapshot<N>) serializersAndConfigs.get(1).f1); } }
@SuppressWarnings("unchecked") @Override protected void restoreKeyAndNamespaceSerializers( InternalTimersSnapshot<K, N> restoredTimersSnapshot, DataInputView in) throws IOException { DataInputViewStream dis = new DataInputViewStream(in); try { restoredTimersSnapshot.setKeySerializer(InstantiationUtil.deserializeObject(dis, userCodeClassLoader, true)); restoredTimersSnapshot.setNamespaceSerializer(InstantiationUtil.deserializeObject(dis, userCodeClassLoader, true)); } catch (ClassNotFoundException exception) { throw new IOException(exception); } } }
@SuppressWarnings("unchecked") @Override protected void restoreKeyAndNamespaceSerializers( InternalTimersSnapshot<K, N> restoredTimersSnapshot, DataInputView in) throws IOException { List<Tuple2<TypeSerializer<?>, TypeSerializerSnapshot<?>>> serializersAndConfigs = TypeSerializerSerializationUtil.readSerializersAndConfigsWithResilience(in, userCodeClassLoader); restoredTimersSnapshot.setKeySerializer((TypeSerializer<K>) serializersAndConfigs.get(0).f0); restoredTimersSnapshot.setKeySerializerConfigSnapshot((TypeSerializerSnapshot<K>) serializersAndConfigs.get(0).f1); restoredTimersSnapshot.setNamespaceSerializer((TypeSerializer<N>) serializersAndConfigs.get(1).f0); restoredTimersSnapshot.setNamespaceSerializerConfigSnapshot((TypeSerializerSnapshot<N>) serializersAndConfigs.get(1).f1); } }
@SuppressWarnings("unchecked") @Override protected void restoreKeyAndNamespaceSerializers( InternalTimersSnapshot<K, N> restoredTimersSnapshot, DataInputView in) throws IOException { DataInputViewStream dis = new DataInputViewStream(in); try { restoredTimersSnapshot.setKeySerializer(InstantiationUtil.deserializeObject(dis, userCodeClassLoader, true)); restoredTimersSnapshot.setNamespaceSerializer(InstantiationUtil.deserializeObject(dis, userCodeClassLoader, true)); } catch (ClassNotFoundException exception) { throw new IOException(exception); } } }
@SuppressWarnings("unchecked") @Override protected void restoreKeyAndNamespaceSerializers( InternalTimersSnapshot<K, N> restoredTimersSnapshot, DataInputView in) throws IOException { List<Tuple2<TypeSerializer<?>, TypeSerializerSnapshot<?>>> serializersAndConfigs = TypeSerializerSerializationUtil.readSerializersAndConfigsWithResilience(in, userCodeClassLoader); restoredTimersSnapshot.setKeySerializer((TypeSerializer<K>) serializersAndConfigs.get(0).f0); restoredTimersSnapshot.setKeySerializerConfigSnapshot((TypeSerializerSnapshot<K>) serializersAndConfigs.get(0).f1); restoredTimersSnapshot.setNamespaceSerializer((TypeSerializer<N>) serializersAndConfigs.get(1).f0); restoredTimersSnapshot.setNamespaceSerializerConfigSnapshot((TypeSerializerSnapshot<N>) serializersAndConfigs.get(1).f1); } }
@SuppressWarnings("unchecked") @Override protected void restoreKeyAndNamespaceSerializers( InternalTimersSnapshot<K, N> restoredTimersSnapshot, DataInputView in) throws IOException { DataInputViewStream dis = new DataInputViewStream(in); try { restoredTimersSnapshot.setKeySerializer(InstantiationUtil.deserializeObject(dis, userCodeClassLoader, true)); restoredTimersSnapshot.setNamespaceSerializer(InstantiationUtil.deserializeObject(dis, userCodeClassLoader, true)); } catch (ClassNotFoundException exception) { throw new IOException(exception); } } }