private Object windowStructuralValue() { return windowCoder.structuralValue(window); }
@Override public Iterable<V> get(byte[] keyBytes, W window) { K key; try { // TODO: We could skip decoding and just compare encoded values for deterministic keyCoders. key = keyCoder.decode(new ByteArrayInputStream(keyBytes)); } catch (IOException e) { throw new RuntimeException(e); } return collection.get( SideInputKey.of(keyCoder.structuralValue(key), windowCoder.structuralValue(window))); }
@Override public void verifyDeterministic() throws NonDeterministicException { innerCoder.verifyDeterministic(); } }
@Override public TypeDescriptor<T> getEncodedTypeDescriptor() { return valueCoder.getEncodedTypeDescriptor(); } }
/** * {@code LengthPrefixCoder} is consistent with equals if the nested {@code Coder} is. * * <p>{@inheritDoc} */ @Override public boolean consistentWithEquals() { return valueCoder.consistentWithEquals(); }
@Override public void verifyDeterministic() throws NonDeterministicException { valueCoder.verifyDeterministic(); windowCoder.verifyDeterministic(); } }
@Override public Iterable<V> get(byte[] keyBytes, W window) { K key; try { // TODO: We could skip decoding and just compare encoded values for deterministic keyCoders. key = keyCoder.decode(new ByteArrayInputStream(keyBytes)); } catch (IOException e) { throw new RuntimeException(e); } return collection.get( SideInputKey.of(keyCoder.structuralValue(key), windowCoder.structuralValue(window))); }
@Override public TypeDescriptor<KV<K, V>> getEncodedTypeDescriptor() { return new TypeDescriptor<KV<K, V>>() {}.where( new TypeParameter<K>() {}, keyCoder.getEncodedTypeDescriptor()) .where(new TypeParameter<V>() {}, valueCoder.getEncodedTypeDescriptor()); } }
/** * {@code NullableCoder} is consistent with equals if the nested {@code Coder} is. * * <p>{@inheritDoc} */ @Override public boolean consistentWithEquals() { return valueCoder.consistentWithEquals(); }
@Override public void verifyDeterministic() throws NonDeterministicException { outputCoder.verifyDeterministic(); } }
private Object windowStructuralValue() { return windowCoder.structuralValue(window); }
@Override public TypeDescriptor<FailsafeElement<OriginalT, CurrentT>> getEncodedTypeDescriptor() { return new TypeDescriptor<FailsafeElement<OriginalT, CurrentT>>() {}.where( new TypeParameter<OriginalT>() {}, originalPayloadCoder.getEncodedTypeDescriptor()) .where(new TypeParameter<CurrentT>() {}, currentPayloadCoder.getEncodedTypeDescriptor()); } }
@Override public boolean consistentWithEquals() { for (Coder<?> keyComponentCoder : keyComponentCoders) { if (!keyComponentCoder.consistentWithEquals()) { return false; } } return valueCoder.consistentWithEquals(); }
@Override public void verifyDeterministic() throws Coder.NonDeterministicException { keyCoder.verifyDeterministic(); timersCoder.verifyDeterministic(); elemsCoder.verifyDeterministic(); }