public static interface PagedRecordTopicDetails.Builder extends PagedTopicDetails.Builder<PagedRecordTopicDetails.Builder,PagedRecordTopicDetails>
The builder can be used to set some record metadata if the default is not what is required.
Modifier and Type | Method and Description |
---|---|
PagedRecordTopicDetails.Builder |
metadata(MRecord metadata)
Sets record metadata to be used for the topic.
|
PagedRecordTopicDetails.Builder |
order(PagedRecordTopicDetails.Attributes.PagedRecordOrderingPolicy.OrderKey... key)
Specifies that the topic should be ordered by
policy , defining the policy in terms of a
set or order keys. |
PagedRecordTopicDetails.Builder |
order(PagedTopicDetails.Attributes.Duplicates duplicatesPolicy,
PagedRecordTopicDetails.Attributes.PagedRecordOrderingPolicy.OrderKey... key)
Specifies that the topic should be ordered by
policy , defining the policy in terms of a
set or order keys. |
order, order, unordered
build, property, reference, reset, tidyOnUnsubscribe
PagedRecordTopicDetails.Builder metadata(MRecord metadata) throws IllegalArgumentException
If no metadata is explicitly supplied,
PagedRecordTopicDetails.Schema.DEFAULT_METADATA
is assumed.
If metadata is to be specified, it must be done before specifying any ordering policy as the policy will be validated against the metadata. Setting metadata will clear any previously specified ordering policy (but not any specified comparator).
metadata
- the record metadataIllegalArgumentException
- if metadata
is nullPagedRecordTopicDetails.Builder order(PagedRecordTopicDetails.Attributes.PagedRecordOrderingPolicy.OrderKey... key) throws MetadataViolationException
policy
, defining the policy in terms of a
set or order keys.
The metadata to use must be specified before specifying the order as the keys will be validated against the metadata.
Fields specified for sorting will be sorted according to their type. Strings will be sorted according to default collation rules (unless additional rules are applied in the key) and numeric types will be sorted according to the magnitude of the number.
Calling this would replace any previously declared ordering policy previously set on the builder.
A duplicates policy of NOT_ALLOWED
is
assumed.
key
- the order keys that specify how to sort the topic data.
Each key much specify a different field in the metadata in the
sort priority order required. Each key must specify a
different metadata field. If no keys are supplied, it is
assumed that sorting will be applied to all fields in the
order they occur within the record and in ascending order with
default string collationMetadataViolationException
- if the supplied keys conflict with
the metadata or a key for the same field has been supplied
more than once. Possible problems are that a key specifies a
field name that is not present in the metadata or collation
rules have been applied to a field that is not defined as a
StringPagedRecordTopicDetails.Builder order(PagedTopicDetails.Attributes.Duplicates duplicatesPolicy, PagedRecordTopicDetails.Attributes.PagedRecordOrderingPolicy.OrderKey... key) throws MetadataViolationException
policy
, defining the policy in terms of a
set or order keys.
The metadata to use must be specified before specifying the order as the keys will be validated against the metadata.
Fields specified for sorting will be sorted according to their type. Strings will be sorted according to default collation rules (unless additional rules are applied in the key) and numeric types will be sorted according to the magnitude of the number.
Calling this would replace any previously declared ordering policy previously set on the builder.
duplicatesPolicy
- specifies the duplicates policy to be applied
when ordering determines that two records are equalkey
- the order keys that specify how to sort the topic data.
Each key much specify a different field in the metadata in the
sort priority order required. Each key must specify a
different metadata field. If no keys are supplied, it is
assumed that sorting will be applied to all fields in the
order they occur within the record and in ascending order with
default string collationMetadataViolationException
- if the supplied keys conflict with
the metadata or a key for the same field has been supplied
more than once. Possible problems are that a key specifies a
field name that is not present in the metadata or collation
rules have been applied to a field that is not defined as a
String or invalid rules suppliedCopyright © 2016 Push Technology Ltd. All Rights Reserved.