@Override public void write(Kryo kryo, Output output, Map map) { super.write(kryo, output, map); CopyOnFirstWriteProperties p = (CopyOnFirstWriteProperties) map; Properties ip = p.getInterned(); kryo.writeObjectOrNull(output, ip, Properties.class); }
@SuppressWarnings("unchecked") @Override public void write( final Kryo kryo, final Output output, @SuppressWarnings("rawtypes") final Map object ) { final Map<?, ?> map; // we only need special support for linked hash map, as SortedMaps will // recreate correct sorting during deserialization... if ( object instanceof LinkedHashMap<?, ?> ) { map = new LinkedHashMap<Object, Object>( object ); } else { map = new HashMap<Object, Object>( object ); } super.write( kryo, output, map ); }
@SuppressWarnings("unchecked") @Override public void write( final Kryo kryo, final Output output, @SuppressWarnings("rawtypes") final Map object ) { final Map<?, ?> map; // we only need special support for linked hash map, as SortedMaps will // recreate correct sorting during deserialization... if ( object instanceof LinkedHashMap<?, ?> ) { map = new LinkedHashMap<Object, Object>( object ); } else { map = new HashMap<Object, Object>( object ); } super.write( kryo, output, map ); }
public void write (Kryo kryo, Output output, Map map) { TreeMap treeMap = (TreeMap)map; kryo.writeClassAndObject(output, treeMap.comparator()); super.write(kryo, output, map); }
public void write (Kryo kryo, Output output, Map map) { TreeMap treeMap = (TreeMap)map; kryo.writeClassAndObject(output, treeMap.comparator()); super.write(kryo, output, map); }
public void write (Kryo kryo, Output output, Map map) { TreeMap treeMap = (TreeMap)map; kryo.writeClassAndObject(output, treeMap.comparator()); super.write(kryo, output, map); }
public void write (Kryo kryo, Output output, Map map) { TreeMap treeMap = (TreeMap)map; kryo.writeClassAndObject(output, treeMap.comparator()); super.write(kryo, output, map); }
/** * {@inheritDoc} */ @SuppressWarnings("rawtypes") @Override public void write(Kryo kryo, Output output, Map map) { if (null != hibernateUtil) { if (hibernateUtil.isPersistentMap(map.getClass()) && !hibernateUtil.isInitialized(map)) { // if Hibernate map is not initialized just write the empty map int length = 0; output.writeInt(length, true); return; } } super.write(kryo, output, map); } }