public static void WriteEvcHint(CacheObjectOutput writer, EvictionHint evcHint) throws IOException { if (evcHint == null) { writer.writeShort((short) EvictionHintType.NULL.getValue()); return; } writer.writeShort((short) evcHint._hintType.getValue()); ((ICompactSerializable) evcHint).serialize(writer); }
/** * Write an object to the underlying storage or stream. The class that implements this interface * defines how the object is written. * * @param output the stream to write the object to. * @param graph the object to write . * @throws CacheIOException Any of the usual Input/Output related exceptions. */ public void writeObject(CacheObjectOutput output, Object graph) throws CacheIOException { BlockDataOutputStream bout = (BlockDataOutputStream) output.getContext().getUserItem("__bout"); try { if (bout != null) { bout.writeUTF((String) graph); } else { output.writeUTF((String) graph); } } catch (IOException ex) { throw new CacheIOException(ex); } }
public void serialize(CacheObjectOutput writer) throws IOException { super.serialize(writer); writer.writeShort(_count); }
@Override public void serialize(CacheObjectOutput writer) throws IOException { writer.writeShort((short) _hintType.getValue()); }