コード例 #1
0
        public virtual RaftLogEntryMetadata CacheMetadata(long logIndex, long entryTerm, LogPosition position)
        {
            RaftLogEntryMetadata result = new RaftLogEntryMetadata(entryTerm, position);

            _raftLogEntryCache.put(logIndex, result);
            return(result);
        }
コード例 #2
0
            public override bool Equals(object o)
            {
                if (this == o)
                {
                    return(true);
                }
                if (o == null || this.GetType() != o.GetType())
                {
                    return(false);
                }

                RaftLogEntryMetadata that = ( RaftLogEntryMetadata )o;

                if (EntryTermConflict != that.EntryTermConflict)
                {
                    return(false);
                }
                return(StartPositionConflict.Equals(that.StartPositionConflict));
            }