X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FReplicatedLogEntry.java;h=1bced2404dea9161ae64dc2f0cee0d37e0a2d677;hp=3bbaa2283836fb24bd221a14d21bb7e250dfa14e;hb=a0b8be5ce48c0d1e0b573d1952211913c58d4935;hpb=7b82869e73c5a9c8137521f1bf9b4e446d48440c diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java index 3bbaa22838..1bced2404d 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java @@ -8,28 +8,33 @@ package org.opendaylight.controller.cluster.raft; +import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload; + /** * Represents one entry in the replicated log */ public interface ReplicatedLogEntry { /** - * The data stored in that entry * - * @return + * @return The payload/data to be replicated */ - Object getData(); + Payload getData(); /** - * The term stored in that entry * - * @return + * @return The term of the entry */ long getTerm(); /** - * The index of the entry * - * @return + * @return The index of the entry */ long getIndex(); + + /** + * + * @return The size of the entry in bytes. An approximate number may be good enough. + */ + int size(); }