@@ -45,16 +45,16 @@ public class LocalCheckpointService extends AbstractIndexShardComponent {
4545 * which marks the seqNo the fist bit in the first array corresponds to.
4646 */
4747 final LinkedList <FixedBitSet > processedSeqNo ;
48- final int bitArraysSize ;
48+ private final int bitArraysSize ;
4949 long firstProcessedSeqNo ;
5050
5151 /** the current local checkpoint, i.e., all seqNo lower (<=) than this number have been completed */
5252 volatile long checkpoint ;
5353
5454 /** the next available seqNo - used for seqNo generation */
55- volatile long nextSeqNo ;
55+ private volatile long nextSeqNo ;
5656
57- public LocalCheckpointService (final ShardId shardId , final IndexSettings indexSettings , final long maxSeqNo , final long checkpoint ) {
57+ LocalCheckpointService (final ShardId shardId , final IndexSettings indexSettings , final long maxSeqNo , final long checkpoint ) {
5858 super (shardId , indexSettings );
5959 bitArraysSize = SETTINGS_BIT_ARRAYS_SIZE .get (indexSettings .getSettings ());
6060 processedSeqNo = new LinkedList <>();
@@ -66,14 +66,14 @@ public LocalCheckpointService(final ShardId shardId, final IndexSettings indexSe
6666 /**
6767 * issue the next sequence number
6868 **/
69- public synchronized long generateSeqNo () {
69+ synchronized long generateSeqNo () {
7070 return nextSeqNo ++;
7171 }
7272
7373 /**
7474 * marks the processing of the given seqNo have been completed
7575 **/
76- public synchronized void markSeqNoAsCompleted (long seqNo ) {
76+ synchronized void markSeqNoAsCompleted (long seqNo ) {
7777 // make sure we track highest seen seqNo
7878 if (seqNo >= nextSeqNo ) {
7979 nextSeqNo = seqNo + 1 ;
@@ -96,7 +96,7 @@ public long getCheckpoint() {
9696 }
9797
9898 /** gets the maximum seqno seen so far */
99- public long getMaxSeqNo () {
99+ long getMaxSeqNo () {
100100 return nextSeqNo - 1 ;
101101 }
102102
0 commit comments