Class Region
java.lang.Object
org.terracotta.offheapstore.util.AATreeSet.AbstractTreeNode<Region>
org.terracotta.offheapstore.storage.allocator.Region
- All Implemented Interfaces:
Comparable<Comparable<?>>, AATreeSet.Node<Region>
Class that represents the regions held within this set.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int(package private) intintcompareTo(Comparable<?> other) Order this region relative to another.intend()booleaninthashCode()protected booleanisNull()voidMerge the supplied region into this region (if they are adjoining).voidvoidintsize()Returns the size of this range (the number of values within its bounds).intstart()Returns the start of this range (inclusive).voidswapPayload(AATreeSet.Node<Region> other) toString()(package private) inttreeSize()booleanprivate voidMethods inherited from class AATreeSet.AbstractTreeNode
decrementLevel, getLeft, getLevel, getRight, incrementLevel, setLevel
-
Field Details
-
start
private int start -
end
private int end -
availableBitSet
private int availableBitSet
-
-
Constructor Details
-
Region
Region(int value) -
Region
Region(int start, int end) Creates a region containing the given range of values (inclusive). -
Region
Region(Region r) Create a shallow copy of a region.The new Region has NULL left and right children.
-
-
Method Details
-
available
int available() -
updateAvailable
private void updateAvailable() -
availableHere
int availableHere() -
setLeft
- Specified by:
setLeftin interfaceAATreeSet.Node<Region>- Overrides:
setLeftin classAATreeSet.AbstractTreeNode<Region>
-
setRight
- Specified by:
setRightin interfaceAATreeSet.Node<Region>- Overrides:
setRightin classAATreeSet.AbstractTreeNode<Region>
-
toString
-
size
public int size()Returns the size of this range (the number of values within its bounds). -
isNull
protected boolean isNull() -
treeSize
int treeSize() -
remove
-
merge
Merge the supplied region into this region (if they are adjoining).- Parameters:
r- region to merge
-
tryMerge
-
compareTo
Order this region relative to another.- Specified by:
compareToin interfaceComparable<Comparable<?>>
-
equals
-
hashCode
-
getPayload
- Specified by:
getPayloadin interfaceAATreeSet.Node<Region>
-
swapPayload
- Specified by:
swapPayloadin interfaceAATreeSet.Node<Region>
-
start
public int start()Returns the start of this range (inclusive). -
end
public int end()
-