/** * This is the place where we serialize entries, and all theirs * elements. * <br> * The structure used to store the entry is the following : * <ul> * <li> * <b>[Dn]</b> : If it's null, stores an empty Dn * </li> * <li> * <b>[attributes number]</b> : the number of attributes. * </li> * <li> * <b>[attribute]*</b> : each attribute, if we have some * </li> * </ul> * * {@inheritDoc} */ @Override public void writeExternal( ObjectOutput out ) throws IOException { entry.writeExternal( out ); }
/** * This is the place where we serialize entries, and all theirs * elements. * <br> * The structure used to store the entry is the following : * <ul> * <li> * <b>[Dn]</b> : If it's null, stores an empty Dn * </li> * <li> * <b>[attributes number]</b> : the number of attributes. * </li> * <li> * <b>[attribute]*</b> : each attribute, if we have some * </li> * </ul> * * {@inheritDoc} */ @Override public void writeExternal( ObjectOutput out ) throws IOException { entry.writeExternal( out ); }
/** * This is the place where we serialize entries, and all theirs * elements. * <br> * The structure used to store the entry is the following : * <ul> * <li> * <b>[Dn]</b> : If it's null, stores an empty Dn * </li> * <li> * <b>[attributes number]</b> : the number of attributes. * </li> * <li> * <b>[attribute]*</b> : each attribute, if we have some * </li> * </ul> * * {@inheritDoc} */ @Override public void writeExternal( ObjectOutput out ) throws IOException { entry.writeExternal( out ); }
/** * {@inheritDoc} */ public byte[] serialize( Object object ) throws IOException { ReplicaEventMessage replicaEventMessage = ( ReplicaEventMessage ) object; Entry entry = replicaEventMessage.getEntry(); ChangeType changeType = replicaEventMessage.getChangeType(); try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream( baos ) ) { // The change type first out.writeByte( changeType.getValue() ); // The entry DN entry.getDn().writeExternal( out ); // The entry entry.writeExternal( out ); out.flush(); return baos.toByteArray(); } }
entry.writeExternal( out ); break;
entry.writeExternal( out ); break;
entry.writeExternal( out ); break;