class ServerConfigurationPayload extends Payload implements PersistentPayload, Serializable {

    @Override
    public int size() {
        if (serializedSize < 0) {
            try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
                try (ObjectOutputStream out = new ObjectOutputStream(bos)) {
                    out.writeObject(writeReplace());
                }

                serializedSize = bos.toByteArray().length;
            } catch (IOException e) {
                serializedSize = 0;
                LOG.error("Error serializing", e);
            }
        }

        return serializedSize;
    }

    public  ServerConfigurationPayload(final @NonNull List<ServerInfo> serverConfig);

}