/** * Load sessionID * @param data serialized session id * @return session id * @throws IOException if an input/output error occurs */ protected String deserializeSessionId(byte[] data) throws IOException { ReplicationStream ois = getReplicationStream(data); String sessionId = ois.readUTF(); ois.close(); return sessionId; }
/** * Load sessionID * @throws IOException if an input/output error occurs */ protected String deserializeSessionId(byte[] data) throws IOException { ReplicationStream ois = getReplicationStream(data); String sessionId = ois.readUTF(); ois.close(); return sessionId; }
/** * Load sessionID * @throws IOException if an input/output error occurs */ protected String deserializeSessionId(byte[] data) throws IOException { ReplicationStream ois = getReplicationStream(data); String sessionId = ois.readUTF(); ois.close(); return sessionId; }
/** * Load Deltarequest from external node * Load the Class at container classloader * @see DeltaRequest#readExternal(java.io.ObjectInput) * @param session Corresponding session * @param data message data * @return The request * @throws ClassNotFoundException Serialization error * @throws IOException IO error with serialization */ protected DeltaRequest deserializeDeltaRequest(DeltaSession session, byte[] data) throws ClassNotFoundException, IOException { session.lock(); try { ReplicationStream ois = getReplicationStream(data); session.getDeltaRequest().readExternal(ois); ois.close(); return session.getDeltaRequest(); } finally { session.unlock(); } }
/** * Load Deltarequest from external node * Load the Class at container classloader * @see DeltaRequest#readExternal(java.io.ObjectInput) * @param session * @param data message data * @return The request * @throws ClassNotFoundException * @throws IOException */ protected DeltaRequest deserializeDeltaRequest(DeltaSession session, byte[] data) throws ClassNotFoundException, IOException { try { session.lock(); ReplicationStream ois = getReplicationStream(data); session.getDeltaRequest().readExternal(ois); ois.close(); return session.getDeltaRequest(); }finally { session.unlock(); } }
/** * Load Deltarequest from external node * Load the Class at container classloader * @see DeltaRequest#readExternal(java.io.ObjectInput) * @param session * @param data message data * @return The request * @throws ClassNotFoundException * @throws IOException */ protected DeltaRequest deserializeDeltaRequest(DeltaSession session, byte[] data) throws ClassNotFoundException, IOException { try { session.lock(); ReplicationStream ois = getReplicationStream(data); session.getDeltaRequest().readExternal(ois); ois.close(); return session.getDeltaRequest(); }finally { session.unlock(); } }
ois = getReplicationStream(data); Integer count = (Integer) ois.readObject(); int n = count.intValue();
ois = getReplicationStream(data); Integer count = (Integer) ois.readObject(); int n = count.intValue();
try (ObjectInputStream ois = getReplicationStream(data)) { Integer count = (Integer) ois.readObject(); int n = count.intValue();