public class StreamConfiguration
extends java.lang.Object
implements io.nats.client.support.JsonSerializable
Builder.| Modifier and Type | Class and Description |
|---|---|
static class |
StreamConfiguration.Builder
StreamConfiguration is created using a Builder.
|
| Modifier and Type | Method and Description |
|---|---|
static StreamConfiguration.Builder |
builder()
Creates a builder for the stream configuration.
|
static StreamConfiguration.Builder |
builder(StreamConfiguration sc)
Creates a builder to copy the stream configuration.
|
boolean |
getAllowAtomicPublish()
Whether Allow Atomic Publish is set
|
boolean |
getAllowDirect()
Get the flag indicating if the stream allows direct message access.
|
boolean |
getAllowMessageCounter()
Whether Allow Message Counter is set
|
boolean |
getAllowMessageTtl()
Whether Allow Message TTL is set
|
boolean |
getAllowMsgSchedules()
Whether Allow Message Schedules is set
|
boolean |
getAllowRollup()
Get the flag indicating if the stream allows rollup.
|
@Nullable CompressionOption |
getCompressionOption()
Gets the compression option for this stream configuration.
|
@Nullable ConsumerLimits |
getConsumerLimits()
Get the consumerLimits configuration.
|
boolean |
getDenyDelete()
Get the flag indicating if deny delete is set for the stream
|
boolean |
getDenyPurge()
Get the flag indicating if deny purge is set for the stream
|
@Nullable java.lang.String |
getDescription()
Gets the description of this stream configuration.
|
@Nullable DiscardPolicy |
getDiscardPolicy()
Gets the discard policy for this stream configuration.
|
@Nullable java.time.Duration |
getDuplicateWindow()
Gets the duplicate checking window stream configuration.
|
long |
getFirstSequence()
The first sequence used in the stream.
|
@NonNull java.time.Duration |
getMaxAge()
Gets the maximum message age for this stream configuration.
|
long |
getMaxBytes()
Gets the maximum number of bytes for this stream configuration.
|
long |
getMaxConsumers()
Gets the maximum number of consumers for this stream configuration.
|
int |
getMaximumMessageSize()
Gets the maximum message size for this stream configuration.
|
long |
getMaxMsgs()
Gets the maximum messages for this stream configuration.
|
long |
getMaxMsgSize()
Deprecated.
the server value is a 32-bit signed value. Use
getMaximumMessageSize() instead. |
long |
getMaxMsgsPerSubject()
Gets the maximum messages for this stream configuration.
|
@Nullable java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Metadata for the stream
|
@Nullable Mirror |
getMirror()
The mirror definition for this stream
|
boolean |
getMirrorDirect()
Get the flag indicating if the stream allows
higher performance and unified direct access for mirrors as well.
|
@NonNull java.lang.String |
getName()
Gets the name of this stream configuration.
|
boolean |
getNoAck()
Gets whether acknowledgements are required in this stream configuration.
|
@Nullable PersistMode |
getPersistMode()
Gets the persist mode or null if it was not explicitly set when creating or the server did not send it with stream info
|
@Nullable Placement |
getPlacement()
Get the placement directives to consider when placing replicas of this stream,
random placement when unset.
|
int |
getReplicas()
Gets the number of replicas for this stream configuration.
|
@Nullable Republish |
getRepublish()
Get the republish configuration.
|
@NonNull RetentionPolicy |
getRetentionPolicy()
Gets the retention policy for this stream configuration.
|
boolean |
getSealed()
Get the flag indicating if the stream is sealed.
|
@Nullable java.util.List<Source> |
getSources()
The sources for this stream
|
@NonNull StorageType |
getStorageType()
Gets the storage type for this stream configuration.
|
@Nullable java.time.Duration |
getSubjectDeleteMarkerTtl()
Get the Subject Delete Marker TTL duration.
|
@NonNull java.util.List<java.lang.String> |
getSubjects()
Gets the subjects for this stream configuration.
|
@Nullable SubjectTransform |
getSubjectTransform()
Get the subjectTransform configuration.
|
@Nullable java.lang.String |
getTemplateOwner()
Gets the template json for this stream configuration.
|
static StreamConfiguration |
instance(java.lang.String json)
Returns a StreamConfiguration deserialized from its JSON form.
|
boolean |
isAllowMessageTtl()
Deprecated.
Prefer getAllowMessageTtl
Whether Allow Message TTL is set
|
boolean |
isDiscardNewPerSubject()
Whether discard policy with max message per subject is applied per subject.
|
@NonNull java.lang.String |
toJson()
Returns a JSON representation of this consumer configuration.
|
java.lang.String |
toString() |
public static StreamConfiguration instance(java.lang.String json) throws io.nats.client.support.JsonParseException
json - the json representing the Stream Configurationio.nats.client.support.JsonParseException - if there is a problem parsing the jsontoJson()public @NonNull java.lang.String toJson()
toJson in interface io.nats.client.support.JsonSerializablepublic @NonNull java.lang.String getName()
public @Nullable java.lang.String getDescription()
public @NonNull java.util.List<java.lang.String> getSubjects()
public @Nullable DiscardPolicy getDiscardPolicy()
public @NonNull RetentionPolicy getRetentionPolicy()
public @Nullable CompressionOption getCompressionOption()
public long getMaxConsumers()
public long getMaxMsgs()
public long getMaxMsgsPerSubject()
public long getMaxBytes()
public @NonNull java.time.Duration getMaxAge()
@Deprecated public long getMaxMsgSize()
getMaximumMessageSize() instead.public int getMaximumMessageSize()
public @NonNull StorageType getStorageType()
public int getReplicas()
public boolean getNoAck()
public @Nullable java.lang.String getTemplateOwner()
public @Nullable java.time.Duration getDuplicateWindow()
public @Nullable Placement getPlacement()
public @Nullable Republish getRepublish()
public @Nullable SubjectTransform getSubjectTransform()
public @Nullable ConsumerLimits getConsumerLimits()
public @Nullable Mirror getMirror()
public @Nullable java.util.List<Source> getSources()
public boolean getSealed()
public boolean getAllowRollup()
public boolean getAllowDirect()
public boolean getMirrorDirect()
public boolean getDenyDelete()
public boolean getDenyPurge()
public boolean isDiscardNewPerSubject()
public @Nullable java.util.Map<java.lang.String,java.lang.String> getMetadata()
public long getFirstSequence()
@Deprecated public boolean isAllowMessageTtl()
public boolean getAllowMessageTtl()
public boolean getAllowMsgSchedules()
public boolean getAllowMessageCounter()
public boolean getAllowAtomicPublish()
public @Nullable java.time.Duration getSubjectDeleteMarkerTtl()
public @Nullable PersistMode getPersistMode()
public java.lang.String toString()
toString in class java.lang.Objectpublic static StreamConfiguration.Builder builder()
public static StreamConfiguration.Builder builder(StreamConfiguration sc)
sc - an existing StreamConfiguration