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 boolean
allowClear()
Allow or deny clearing a lazy reference.void
allowUnload(boolean allow)
ArrayList<E>
getData()
int
getOffset()
int
getSize()
boolean
isLoaded()
Check if the lazy loaded data of this segment has been loaded.boolean
isModified()
Check if this segment has modifications that are not yet persisted.int
size()
get the number of contained element in this segment.String
toString()
boolean
unloadAllowed()
void
unloadSegment()
Unload the lazy data of this segment
-
Method Details
-
size
public int size()Description copied from interface:LazySegment
get the number of contained element in this segment.- Specified by:
size
in interfaceLazySegment<ArrayList<E>>
- Returns:
- number of contained elements;
-
allowUnload
public void allowUnload(boolean allow)- Specified by:
allowUnload
in interfaceLazySegment<ArrayList<E>>
-
unloadAllowed
public boolean unloadAllowed()- Specified by:
unloadAllowed
in interfaceLazySegment<ArrayList<E>>
-
getOffset
public int getOffset() -
getSize
public int getSize() -
isLoaded
public boolean isLoaded()Description copied from interface:LazySegment
Check if the lazy loaded data of this segment has been loaded.- Specified by:
isLoaded
in interfaceLazySegment<ArrayList<E>>
- Returns:
- true if loaded, otherwise false.
-
isModified
public boolean isModified()Description copied from interface:LazySegment
Check if this segment has modifications that are not yet persisted.- Specified by:
isModified
in interfaceLazySegment<ArrayList<E>>
- Returns:
- true if there are modifications not yet persisted, otherwise false.
-
unloadSegment
public void unloadSegment()Description copied from interface:LazySegment
Unload the lazy data of this segment- Specified by:
unloadSegment
in interfaceLazySegment<ArrayList<E>>
-
allowClear
public boolean allowClear()Description copied from interface:LazyClearController
Allow or deny clearing a lazy reference.- Specified by:
allowClear
in interfaceLazyClearController
- Returns:
- true if clearing the lazy reference is allowed, otherwise false.
-
getData
- Specified by:
getData
in interfaceLazySegment<ArrayList<E>>
-
toString
-