private Decoder<Object> getDecoder(List<Object> parts, byte[] name) { PubSubEntry entry = entries.get(new ChannelName(name)); if (entry != null) { return entry.getDecoder().getDecoder(parts.size(), state()); } return ByteArrayCodec.INSTANCE.getValueDecoder(); }
private Decoder<Object> getDecoder(List<Object> parts, byte[] name) { PubSubEntry entry = entries.get(new ChannelName(name)); if (entry != null) { return entry.getDecoder().getDecoder(parts.size(), state()); } return ByteArrayCodec.INSTANCE.getValueDecoder(); }
Decoder<Object> decoder = decoders[index].getDecoder(paramNum, state); if (decoder == RESET) { NestedDecoderState s = getDecoder(state); s.setIndex(0); int ind = s.getIndex(); return decoders[ind].getDecoder(paramNum, state); s.setIndex(1); int ind = s.getIndex(); return decoders[ind].getDecoder(paramNum, state);
Decoder<Object> decoder = decoders[index].getDecoder(paramNum, state); if (decoder == RESET) { NestedDecoderState s = getDecoder(state); s.setIndex(0); int ind = s.getIndex(); return decoders[ind].getDecoder(paramNum, state); s.setIndex(1); int ind = s.getIndex(); return decoders[ind].getDecoder(paramNum, state);
@Override public Object decode(List<Object> parts, State state) { NestedDecoderState s = getDecoder(state); int index = s.getIndex(); index += s.incPartsIndex(); if (fixedIndex != null && parts.isEmpty()) { s.resetPartsIndex(); } if (index == -1 || (fixedIndex != null && state.getLevel() == 0)) { return decoders[decoders.length-1].decode(parts, state); } Object res = decoders[index].decode(parts, state); if (res == null) { index = s.incIndex() + s.getPartsIndex(); return decoders[index].decode(parts, state); } // TODO refactor it! Decoder<Object> decoder = decoders[index].getDecoder(0, state); if (decoder == RESET_INDEX) { s.setIndex(-1); } return res; }
@Override public Object decode(List<Object> parts, State state) { NestedDecoderState s = getDecoder(state); int index = s.getIndex(); index += s.incPartsIndex(); if (fixedIndex != null && parts.isEmpty()) { s.resetPartsIndex(); } if (index == -1 || (fixedIndex != null && state.getLevel() == 0)) { return decoders[decoders.length-1].decode(parts, state); } Object res = decoders[index].decode(parts, state); if (res == null) { index = s.incIndex() + s.getPartsIndex(); return decoders[index].decode(parts, state); } // TODO refactor it! Decoder<Object> decoder = decoders[index].getDecoder(0, state); if (decoder == RESET_INDEX) { s.setIndex(-1); } return res; }
MultiDecoder<Object> multiDecoder = data.getCommand().getReplayMultiDecoder(); if (multiDecoder != null) { Decoder<Object> mDecoder = multiDecoder.getDecoder(parts.size(), state()); if (mDecoder != null) { return mDecoder;
MultiDecoder<Object> multiDecoder = data.getCommand().getReplayMultiDecoder(); if (multiDecoder != null) { Decoder<Object> mDecoder = multiDecoder.getDecoder(parts.size(), state()); if (mDecoder != null) { return mDecoder;
private Decoder<Object> getDecoder(List<Object> parts, byte[] name) { PubSubEntry entry = entries.get(new ChannelName(name)); if (entry != null) { return entry.getDecoder().getDecoder(parts.size(), state()); } return ByteArrayCodec.INSTANCE.getValueDecoder(); }
Decoder<Object> decoder = decoders[index].getDecoder(paramNum, state); if (decoder == RESET) { NestedDecoderState s = getDecoder(state); s.setIndex(0); int ind = s.getIndex(); return decoders[ind].getDecoder(paramNum, state); s.setIndex(1); int ind = s.getIndex(); return decoders[ind].getDecoder(paramNum, state);
MultiDecoder<Object> multiDecoder = data.getCommand().getReplayMultiDecoder(); if (multiDecoder != null) { Decoder<Object> mDecoder = multiDecoder.getDecoder(parts.size(), state.get()); if (mDecoder != null) { return mDecoder;
@Override public Object decode(List<Object> parts, State state) { NestedDecoderState s = getDecoder(state); int index = s.getIndex(); index += s.incPartsIndex(); if (fixedIndex != null && parts.isEmpty()) { s.resetPartsIndex(); } if (index == -1 || (fixedIndex != null && state.getLevel() == 0)) { return decoders[decoders.length-1].decode(parts, state); } Object res = decoders[index].decode(parts, state); if (res == null) { index = s.incIndex() + s.getPartsIndex(); return decoders[index].decode(parts, state); } // TODO refactor it! Decoder<Object> decoder = decoders[index].getDecoder(0, state); if (decoder == RESET_INDEX) { s.setIndex(-1); } return res; }