@Override public Map readObject(ObjectInput input) throws IOException, ClassNotFoundException { return Immutables.immutableMapWrap(MarshallUtil.unmarshallMap(input, HashMap::new)); }
@Override public LastSessionRefreshEvent readObject(ObjectInput input) throws IOException, ClassNotFoundException { Map<String, SessionData> map = MarshallUtil.unmarshallMap(input, new MarshallUtil.MapBuilder<String, SessionData, Map<String, SessionData>>() { @Override public Map<String, SessionData> build(int size) { return new HashMap<>(size); } }); LastSessionRefreshEvent event = new LastSessionRefreshEvent(map); return event; }
@Override public SessionEntityWrapper readObject(ObjectInput input) throws IOException, ClassNotFoundException { byte version = input.readByte(); if (version != VERSION_1) { throw new IOException("Invalid version: " + version); } final boolean forTransport = input.readBoolean(); if (forTransport) { final SessionEntity entity = (SessionEntity) input.readObject(); final SessionEntityWrapper res = new SessionEntityWrapper(entity); if (log.isTraceEnabled()) { log.tracef("Loaded entity from remote store: %s, version=%s, metadata=%s", entity, res.version, res.localMetadata); } return res; } else { UUID sessionVersion = new UUID(input.readLong(), input.readLong()); HashMap<String, String> map = MarshallUtil.unmarshallMap(input, HashMap::new); final SessionEntity entity = (SessionEntity) input.readObject(); if (log.isTraceEnabled()) { log.tracef("Found entity locally: entity=%s, version=%s, metadata=%s", entity, sessionVersion, map); } return new SessionEntityWrapper(sessionVersion, map, entity); } }
public AuthenticationSessionAuthNoteUpdateEvent readObjectVersion1(ObjectInput input) throws IOException, ClassNotFoundException { return create( MarshallUtil.unmarshallString(input), MarshallUtil.unmarshallString(input), MarshallUtil.unmarshallString(input), MarshallUtil.unmarshallMap(input, HashMap::new) ); }