Пример #1
0
  public static EvictionHint ReadEvcHint(CacheObjectInput reader)
      throws IOException, ClassNotFoundException {
    EvictionHintType expHint = EvictionHintType.Parent;
    expHint = EvictionHintType.forValue(reader.readShort());
    EvictionHint tmpObj = null;
    switch (expHint) {
      case NULL:
        return null;

      case Parent:
        tmpObj = (EvictionHint) reader.readObject();
        return (EvictionHint) tmpObj;

      case CounterHint:
        CounterHint ch = new CounterHint();
        ((ICompactSerializable) ch).deserialize(reader);
        return (EvictionHint) ch;

      case PriorityEvictionHint:
        PriorityEvictionHint peh = new PriorityEvictionHint();
        ((ICompactSerializable) peh).deserialize(reader);
        return (EvictionHint) peh;

      case TimestampHint:
        TimestampHint tsh = new TimestampHint();
        ((ICompactSerializable) tsh).deserialize(reader);
        return (EvictionHint) tsh;

      default:
        break;
    }
    return null;
  }
Пример #2
0
 public void deserialize(CacheObjectInput reader) throws ClassNotFoundException, IOException {
   super.deserialize(reader);
   _count = reader.readShort();
 }
Пример #3
0
 @Override
 public void deserialize(CacheObjectInput reader) throws ClassNotFoundException, IOException {
   _hintType = EvictionHintType.forValue(reader.readShort());
 }