public class StreamConfiguration extends java.lang.Object implements 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 |
getAllowDirect()
Get the flag indicating if the stream allows direct message access.
|
boolean |
getAllowRollup()
Get the flag indicating if the stream allows rollup.
|
CompressionOption |
getCompressionOption()
Gets the compression option for this stream configuration.
|
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
|
java.lang.String |
getDescription()
Gets the description of this stream configuration.
|
DiscardPolicy |
getDiscardPolicy()
Gets the discard policy for this stream configuration.
|
java.time.Duration |
getDuplicateWindow()
Gets the duplicate checking window stream configuration.
|
long |
getFirstSequence()
The first sequence used in the stream.
|
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.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Metadata for the stream
|
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.
|
java.lang.String |
getName()
Gets the name of this stream configuration.
|
boolean |
getNoAck()
Gets whether acknowledgements are required in this stream configuration.
|
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.
|
Republish |
getRepublish()
Get the republish configuration.
|
RetentionPolicy |
getRetentionPolicy()
Gets the retention policy for this stream configuration.
|
boolean |
getSealed()
Get the flag indicating if the stream is sealed.
|
java.util.List<Source> |
getSources()
The sources for this stream
|
StorageType |
getStorageType()
Gets the storage type for this stream configuration.
|
java.time.Duration |
getSubjectDeleteMarkerTtl()
Get the Subject Delete Marker TTL duration.
|
java.util.List<java.lang.String> |
getSubjects()
Gets the subjects for this stream configuration.
|
SubjectTransform |
getSubjectTransform()
Get the subjectTransform configuration.
|
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()
Whether Allow Message TTL is set
|
boolean |
isDiscardNewPerSubject()
Whether discard policy with max message per subject is applied per subject.
|
java.lang.String |
toJson()
Returns a JSON representation of this consumer configuration.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
serialize, toJsonValue
public static StreamConfiguration instance(java.lang.String json) throws JsonParseException
json
- the json representing the Stream ConfigurationJsonParseException
- thrown if the parsing fails for invalid jsontoJson()
public java.lang.String toJson()
toJson
in interface JsonSerializable
public java.lang.String getName()
public java.lang.String getDescription()
public java.util.List<java.lang.String> getSubjects()
public DiscardPolicy getDiscardPolicy()
public RetentionPolicy getRetentionPolicy()
public CompressionOption getCompressionOption()
public long getMaxConsumers()
public long getMaxMsgs()
public long getMaxMsgsPerSubject()
public long getMaxBytes()
public java.time.Duration getMaxAge()
@Deprecated public long getMaxMsgSize()
getMaximumMessageSize()
instead.public int getMaximumMessageSize()
public StorageType getStorageType()
public int getReplicas()
public boolean getNoAck()
public java.lang.String getTemplateOwner()
public java.time.Duration getDuplicateWindow()
public Placement getPlacement()
public Republish getRepublish()
public SubjectTransform getSubjectTransform()
public ConsumerLimits getConsumerLimits()
public Mirror getMirror()
public 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 java.util.Map<java.lang.String,java.lang.String> getMetadata()
public long getFirstSequence()
public boolean isAllowMessageTtl()
public java.time.Duration getSubjectDeleteMarkerTtl()
public java.lang.String toString()
toString
in class java.lang.Object
public static StreamConfiguration.Builder builder()
public static StreamConfiguration.Builder builder(StreamConfiguration sc)
sc
- an existing StreamConfiguration