예제 #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);
 }
예제 #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);
   }
 }
예제 #3
0
 @Override
 public Object[] getParameters() {
   return new Object[] {
     key,
     oldValue,
     newValue,
     lifespanMillis,
     maxIdleTimeMillis,
     ignorePreviousValue,
     Flag.copyWithoutRemotableFlags(flags),
     previousRead
   };
 }
예제 #4
0
 @Override
 public Object[] getParameters() {
   return new Object[] {key, Flag.copyWithoutRemotableFlags(flags)};
 }
예제 #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()));
 }
예제 #7
0
 @Override
 public void writeObject(ObjectOutput output, Flag flag) throws IOException {
   output.writeByte(flag.ordinal());
 }
예제 #8
0
 @Override
 public Object[] getParameters() {
   return new Object[] {
     key, delta, keys, Flag.copyWithoutRemotableFlags(flags), commandInvocationId
   };
 }