/**
  * Asynchronously write to the logging unit.
  *
  * @param address The address to write to.
  * @param streams The streams, if any, that this write belongs to.
  * @param rank The rank of this write (used for quorum replication).
  * @param writeObject The object, pre-serialization, to write.
  * @param backpointerMap The map of backpointers to write.
  * @return A CompletableFuture which will complete with the WriteResult once the write completes.
  */
 public CompletableFuture<Boolean> write(
     long address,
     Set<UUID> streams,
     long rank,
     Object writeObject,
     Map<UUID, Long> backpointerMap) {
   ByteBuf payload = ByteBufAllocator.DEFAULT.buffer();
   Serializers.getSerializer(CORFU).serialize(writeObject, payload);
   WriteRequest wr = new WriteRequest(WriteMode.NORMAL, null, payload);
   wr.setStreams(streams);
   wr.setRank(rank);
   wr.setBackpointerMap(backpointerMap);
   wr.setGlobalAddress(address);
   return router.sendMessageAndGetCompletable(CorfuMsgType.WRITE.payloadMsg(wr));
 }
 public CompletableFuture<Boolean> writeStream(
     long address, Map<UUID, Long> streamAddresses, Object object) {
   ByteBuf payload = ByteBufAllocator.DEFAULT.buffer();
   Serializers.getSerializer(CORFU).serialize(object, payload);
   return writeStream(address, streamAddresses, payload);
 }