@NotThreadSafe public class InvalidTxList extends Object
TransactionManager
to store invalid transaction ids.
This class uses both a list and an array to keep track of the invalid ids. The list is the primary
data structure for storing the invalid ids. The array is populated lazily on changes to the list.
The array is used to avoid creating a new array every time method toSortedArray()
is invoked.
This class is not thread safe and relies on external synchronization. TransactionManager always
accesses an instance of this class after synchronization.Constructor and Description |
---|
InvalidTxList() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(long id) |
boolean |
addAll(Collection<? extends Long> ids) |
boolean |
addAll(it.unimi.dsi.fastutil.longs.LongList ids) |
void |
clear() |
boolean |
contains(long id) |
boolean |
isEmpty() |
boolean |
remove(long id) |
boolean |
removeAll(Collection<? extends Long> ids) |
boolean |
removeAll(it.unimi.dsi.fastutil.longs.LongList ids) |
int |
size() |
it.unimi.dsi.fastutil.longs.LongList |
toRawList() |
long[] |
toSortedArray() |
public int size()
public boolean isEmpty()
public boolean add(long id)
public boolean addAll(Collection<? extends Long> ids)
public boolean addAll(it.unimi.dsi.fastutil.longs.LongList ids)
public boolean contains(long id)
public boolean remove(long id)
public boolean removeAll(Collection<? extends Long> ids)
public boolean removeAll(it.unimi.dsi.fastutil.longs.LongList ids)
public void clear()
public long[] toSortedArray()
public it.unimi.dsi.fastutil.longs.LongList toRawList()
Copyright © 2018 The Apache Software Foundation. All rights reserved.