public class SegmentHolder extends Object implements Comparable<SegmentHolder>
Requests are naturally ordered using the COMPARE_ACTION_THEN_INTERVAL.
| Constructor and Description |
|---|
SegmentHolder(DataSegment segment,
SegmentAction action,
LoadPeonCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(LoadPeonCallback callback) |
int |
compareTo(SegmentHolder that) |
boolean |
equals(Object o) |
SegmentAction |
getAction() |
List<LoadPeonCallback> |
getCallbacks()
Returns an immutable copy of all non-null callbacks for this queued segment.
|
DataSegmentChangeRequest |
getChangeRequest() |
long |
getFirstRequestMillis() |
DataSegment |
getSegment() |
String |
getSegmentIdentifier() |
int |
hashCode() |
int |
incrementAndGetRunsInQueue() |
boolean |
isLoad() |
boolean |
isRequestSentToServer() |
void |
markRequestSentToServer() |
String |
toString() |
public SegmentHolder(DataSegment segment, SegmentAction action, @Nullable LoadPeonCallback callback)
public DataSegment getSegment()
public SegmentAction getAction()
public boolean isLoad()
public DataSegmentChangeRequest getChangeRequest()
public String getSegmentIdentifier()
public void addCallback(@Nullable LoadPeonCallback callback)
public List<LoadPeonCallback> getCallbacks()
public void markRequestSentToServer()
public boolean isRequestSentToServer()
public long getFirstRequestMillis()
public int incrementAndGetRunsInQueue()
public int compareTo(SegmentHolder that)
compareTo in interface Comparable<SegmentHolder>Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.