primaryTerm
public long primaryTerm()
The primary term of this retention lease collection.
- Returns:
- the primary term
Writeable
, org.elasticsearch.common.xcontent.ToXContent
, org.elasticsearch.common.xcontent.ToXContentFragment
public class RetentionLeases extends java.lang.Object implements org.elasticsearch.common.xcontent.ToXContentFragment, Writeable
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static RetentionLeases |
EMPTY |
Represents an empty an un-versioned retention lease collection.
|
EMPTY_PARAMS
Constructor | Description |
---|---|
RetentionLeases(long primaryTerm,
long version,
java.util.Collection<RetentionLease> leases) |
Constructs a new retention lease collection with the specified version and underlying collection of retention leases.
|
RetentionLeases(StreamInput in) |
Constructs a new retention lease collection from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
contains(java.lang.String id) |
Checks if this retention lease collection contains a retention lease with the specified
RetentionLease.id() . |
boolean |
equals(java.lang.Object o) |
|
static RetentionLeases |
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) |
Parses a retention leases collection from
XContent . |
RetentionLease |
get(java.lang.String id) |
Returns the retention lease with the specified ID, or null if no such retention lease exists.
|
int |
hashCode() |
|
java.util.Collection<RetentionLease> |
leases() |
The underlying collection of retention leases
|
long |
primaryTerm() |
The primary term of this retention lease collection.
|
java.lang.String |
toString() |
|
org.elasticsearch.common.xcontent.XContentBuilder |
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder,
org.elasticsearch.common.xcontent.ToXContent.Params params) |
|
long |
version() |
The version of this retention lease collection.
|
void |
writeTo(StreamOutput out) |
Writes a retention lease collection to a stream in a manner suitable for later reconstruction via
RetentionLeases(StreamInput) (StreamInput)}. |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
primaryTerm
- the primary term under which this retention lease collection was createdversion
- the version of this retention lease collectionleases
- the retention leaseswriteTo(StreamOutput)
.in
- the stream to construct the retention lease collection fromjava.io.IOException
- if an I/O exception occurs reading from the streamRetentionLease.id()
.id
- the retention lease IDid
- the retention lease IDRetentionLeases(StreamInput)
(StreamInput)}.toXContent
in interface org.elasticsearch.common.xcontent.ToXContent
java.io.IOException
XContent
. This method assumes that the retention
leases were converted to XContent
via toXContent(XContentBuilder, Params)
.parser
- the parserequals
in class java.lang.Object
hashCode
in class java.lang.Object
toString
in class java.lang.Object