public void appendSnapshot ( final long recordingId , final long leadershipTermId , final long termBaseLogPosition , final long logPosition , final long timestamp , final int serviceId ) { final int size = entries . size ( ) ; if ( size > 0 ) { final Entry entry = entries . get ( size - 1 ) ; if ( entry . type == ENTRY_TYPE_TERM && entry . leadershipTermId != leadershipTermId ) { throw new ClusterException ( "leadershipTermId out of sequence: previous " + entry . leadershipTermId + " this " + leadershipTermId ) ; } } append ( ENTRY_TYPE_SNAPSHOT , recordingId , leadershipTermId , termBaseLogPosition , logPosition , timestamp , serviceId ) ; }
Append a log entry for a snapshot .