Exemplo n.º 1
0
 @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);
 }
Exemplo n.º 2
0
 @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);
   }
 }
Exemplo n.º 3
0
 @Override
 public Object[] getParameters() {
   return new Object[] {
     key,
     oldValue,
     newValue,
     lifespanMillis,
     maxIdleTimeMillis,
     ignorePreviousValue,
     Flag.copyWithoutRemotableFlags(flags),
     previousRead
   };
 }
Exemplo n.º 4
0
 @Override
 public Object[] getParameters() {
   return new Object[] {key, Flag.copyWithoutRemotableFlags(flags)};
 }
Exemplo n.º 5
0
 @Override
 public Object[] getParameters() {
   return new Object[] {globalTx, unlock, keys, Flag.copyWithoutRemotableFlags(flags)};
 }
 public void testFlagMarshalling() throws Exception {
   marshallAndAssertEquality(Arrays.asList(Flag.values()));
 }
Exemplo n.º 7
0
 @Override
 public void writeObject(ObjectOutput output, Flag flag) throws IOException {
   output.writeByte(flag.ordinal());
 }
Exemplo n.º 8
0
 @Override
 public Object[] getParameters() {
   return new Object[] {
     key, delta, keys, Flag.copyWithoutRemotableFlags(flags), commandInvocationId
   };
 }