Package one.microstream.collections.lazy
Class LazyArrayList.Segment
java.lang.Object
one.microstream.collections.lazy.LazyArrayList.Segment
- All Implemented Interfaces:
LazySegment<ArrayList<E>>,LazyClearController
- Enclosing class:
- LazyArrayList<E>
public final class LazyArrayList.Segment extends Object implements LazyClearController, LazySegment<ArrayList<E>>
-
Method Summary
Modifier and Type Method Description booleanallowClear()Allow or deny clearing a lazy reference.voidallowUnload(boolean allow)ArrayList<E>getData()intgetOffset()intgetSize()booleanisLoaded()Check if the lazy loaded data of this segment has been loaded.booleanisModified()Check if this segment has modifications that are not yet persisted.intsize()get the number of contained element in this segment.StringtoString()booleanunloadAllowed()voidunloadSegment()Unload the lazy data of this segment
-
Method Details
-
size
public int size()Description copied from interface:LazySegmentget the number of contained element in this segment.- Specified by:
sizein interfaceLazySegment<ArrayList<E>>- Returns:
- number of contained elements;
-
allowUnload
public void allowUnload(boolean allow)- Specified by:
allowUnloadin interfaceLazySegment<ArrayList<E>>
-
unloadAllowed
public boolean unloadAllowed()- Specified by:
unloadAllowedin interfaceLazySegment<ArrayList<E>>
-
getOffset
public int getOffset() -
getSize
public int getSize() -
isLoaded
public boolean isLoaded()Description copied from interface:LazySegmentCheck if the lazy loaded data of this segment has been loaded.- Specified by:
isLoadedin interfaceLazySegment<ArrayList<E>>- Returns:
- true if loaded, otherwise false.
-
isModified
public boolean isModified()Description copied from interface:LazySegmentCheck if this segment has modifications that are not yet persisted.- Specified by:
isModifiedin interfaceLazySegment<ArrayList<E>>- Returns:
- true if there are modifications not yet persisted, otherwise false.
-
unloadSegment
public void unloadSegment()Description copied from interface:LazySegmentUnload the lazy data of this segment- Specified by:
unloadSegmentin interfaceLazySegment<ArrayList<E>>
-
allowClear
public boolean allowClear()Description copied from interface:LazyClearControllerAllow or deny clearing a lazy reference.- Specified by:
allowClearin interfaceLazyClearController- Returns:
- true if clearing the lazy reference is allowed, otherwise false.
-
getData
- Specified by:
getDatain interfaceLazySegment<ArrayList<E>>
-
toString
-