@Override public void writeTo(ObjectOutput output) throws IOException { output.writeObject(key); output.writeObject(value); output.writeLong(Flag.copyWithoutRemotableFlags(getFlagsBitSet())); MarshallUtil.marshallEnum(valueMatcher, output); output.writeObject(commandInvocationId); }
@Override public Flag readObject(ObjectInput input) throws IOException, ClassNotFoundException { byte flagByte = input.readByte(); try { // values() cached by Class.getEnumConstants() return Flag.values()[flagByte]; } catch (ArrayIndexOutOfBoundsException e) { throw new IllegalStateException("Unknown flag index: " + flagByte); } }
@Override public Object[] getParameters() { return new Object[] { key, oldValue, newValue, lifespanMillis, maxIdleTimeMillis, ignorePreviousValue, Flag.copyWithoutRemotableFlags(flags), previousRead }; }
@Override public Object[] getParameters() { return new Object[] {key, Flag.copyWithoutRemotableFlags(flags)}; }
@Override public Object[] getParameters() { return new Object[] {globalTx, unlock, keys, Flag.copyWithoutRemotableFlags(flags)}; }
public void testFlagMarshalling() throws Exception { marshallAndAssertEquality(Arrays.asList(Flag.values())); }
@Override public void writeObject(ObjectOutput output, Flag flag) throws IOException { output.writeByte(flag.ordinal()); }
@Override public Object[] getParameters() { return new Object[] { key, delta, keys, Flag.copyWithoutRemotableFlags(flags), commandInvocationId }; }