Skip to content

Commit

Permalink
Use index
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontedor committed Oct 31, 2017
1 parent b2cbfc5 commit cabda87
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -223,8 +223,9 @@ private long getBitArrayKey(final long seqNo) {
private FixedBitSet getBitArrayForSeqNo(final long seqNo) {
assert Thread.holdsLock(this);
final long bitArrayKey = getBitArrayKey(seqNo);
if (processedSeqNo.containsKey(bitArrayKey) == false) {
processedSeqNo.put(bitArrayKey, new FixedBitSet(bitArraysSize));
final int index = processedSeqNo.indexOf(bitArrayKey);
if (processedSeqNo.indexExists(index) == false) {
processedSeqNo.indexInsert(index, bitArrayKey, new FixedBitSet(bitArraysSize));
}
return processedSeqNo.get(bitArrayKey);
}
Expand Down

0 comments on commit cabda87

Please sign in to comment.