Class MStreamDescriptor
- java.lang.Object
-
- com.mapr.kafka.eventstreams.impl.admin.MStreamDescriptor
-
- All Implemented Interfaces:
StreamDescriptor,java.lang.Cloneable
public class MStreamDescriptor extends java.lang.Object implements StreamDescriptor
-
-
Constructor Summary
Constructors Constructor Description MStreamDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAdminPerms()booleangetAutoCreateTopics()booleangetClientCompression()booleangetCompact()Gets log compaction on a stream.longgetCompactionThrottleFactor()java.lang.StringgetCompressionAlgo()java.lang.StringgetConsumePerms()java.lang.StringgetCopyPerms()intgetDefaultPartitions()TimestampTypegetDefaultTimestampType()longgetDeleteRetentionMS()Applies only if log compaction is enabled on the stream.booleangetForce()booleangetIsChangelog()longgetMinCompactionLagMS()Applies only if log compaction is enabled on the stream.java.lang.StringgetProducePerms()longgetProducerIdExpirySecs()longgetTimeToLiveSec()java.lang.StringgetTopicPerms()booleanhasAdminPerms()booleanhasAutoCreateTopics()booleanhasClientCompression()booleanhasCompact()booleanhasCompactionThrottleFactor()booleanhasCompressionAlgo()booleanhasConsumePerms()booleanhasCopyPerms()booleanhasDefaultPartitions()booleanhasDeleteRetentionMS()booleanhasIsChangelog()booleanhasMinCompactionLagMS()booleanhasProducePerms()booleanhasProducerIdExpirySecs()booleanhasTimestampType()booleanhasTimeToLiveSec()booleanhasTopicPerms()booleanisKafkaTopic()voidsetAdminPerms(java.lang.String perms)Sets the admin permission ace.voidsetAutoCreateTopics(boolean allow)Sets if topics should be auto-created when a message is produced.voidsetClientCompression(boolean val)voidsetCompact(boolean logCompaction)Sets the log compaction on stream.voidsetCompactionThrottleFactor(long tf)voidsetCompressionAlgo(java.lang.String algo)Sets the compression algo.voidsetConsumePerms(java.lang.String perms)Sets the consume permission ace.voidsetCopyPerms(java.lang.String perms)Sets the copy permission ace.voidsetDefaultPartitions(int numFeeds)Sets the default number of partitions per topic.voidsetDefaultTimestampType(TimestampType timestampType)Sets timestamp typevoidsetDeleteRetentionMS(long ts)Set the time in millisecond for which delete records are retained.voidsetForce()voidsetIsChangelog(boolean ischglog)Sets the type of the stream to be Changelog.voidsetKafkaTopic(boolean kafkaTopic)Sets if the stream is a kafka topic stream.voidsetMinCompactionLagMS(long ts)Set time in millisecond a message should remain uncompacted in the topic-partition.Applies only if log compaction is enabled on the stream.voidsetProducePerms(java.lang.String perms)Sets the producer permission ace.voidsetProducerIdExpirySecs(long producerIdExpirySecs)Sets the producer id expiryvoidsetTimeToLiveSec(long sec)Sets the time-to-live for messages.voidsetTopicPerms(java.lang.String perms)Sets the topic permission ace.
-
-
-
Method Detail
-
hasDefaultPartitions
public boolean hasDefaultPartitions()
-
getDefaultPartitions
public int getDefaultPartitions()
- Specified by:
getDefaultPartitionsin interfaceStreamDescriptor- Returns:
- the default number of partitions per topic.
-
setDefaultPartitions
public void setDefaultPartitions(int numFeeds)
Description copied from interface:StreamDescriptorSets the default number of partitions per topic.- Specified by:
setDefaultPartitionsin interfaceStreamDescriptor- Parameters:
numFeeds- the number of partitions
-
hasTimeToLiveSec
public boolean hasTimeToLiveSec()
-
getTimeToLiveSec
public long getTimeToLiveSec()
- Specified by:
getTimeToLiveSecin interfaceStreamDescriptor- Returns:
- time-to-live for messages in seconds.
-
setTimeToLiveSec
public void setTimeToLiveSec(long sec)
Description copied from interface:StreamDescriptorSets the time-to-live for messages.- Specified by:
setTimeToLiveSecin interfaceStreamDescriptor- Parameters:
sec- the time to live
-
hasCompressionAlgo
public boolean hasCompressionAlgo()
-
getCompressionAlgo
public java.lang.String getCompressionAlgo()
- Specified by:
getCompressionAlgoin interfaceStreamDescriptor- Returns:
- the compression algo.
-
setCompressionAlgo
public void setCompressionAlgo(java.lang.String algo)
Description copied from interface:StreamDescriptorSets the compression algo.- Specified by:
setCompressionAlgoin interfaceStreamDescriptor- Parameters:
algo- the compression algorithm name.
-
hasClientCompression
public boolean hasClientCompression()
-
getClientCompression
public boolean getClientCompression()
-
setClientCompression
public void setClientCompression(boolean val)
-
hasAutoCreateTopics
public boolean hasAutoCreateTopics()
-
getAutoCreateTopics
public boolean getAutoCreateTopics()
- Specified by:
getAutoCreateTopicsin interfaceStreamDescriptor- Returns:
trueif topics should be auto-created when a message is produced.
-
setAutoCreateTopics
public void setAutoCreateTopics(boolean allow)
Description copied from interface:StreamDescriptorSets if topics should be auto-created when a message is produced.- Specified by:
setAutoCreateTopicsin interfaceStreamDescriptor- Parameters:
allow-trueif topics should be auto-created.
-
hasProducePerms
public boolean hasProducePerms()
-
getProducePerms
public java.lang.String getProducePerms()
- Specified by:
getProducePermsin interfaceStreamDescriptor- Returns:
- the producer permission ace.
-
setProducePerms
public void setProducePerms(java.lang.String perms)
Description copied from interface:StreamDescriptorSets the producer permission ace.- Specified by:
setProducePermsin interfaceStreamDescriptor- Parameters:
perms- the producer permission ace.
-
hasConsumePerms
public boolean hasConsumePerms()
-
getConsumePerms
public java.lang.String getConsumePerms()
- Specified by:
getConsumePermsin interfaceStreamDescriptor- Returns:
- the consume permission ace.
-
setConsumePerms
public void setConsumePerms(java.lang.String perms)
Description copied from interface:StreamDescriptorSets the consume permission ace.- Specified by:
setConsumePermsin interfaceStreamDescriptor- Parameters:
perms- the consume permission ace.
-
hasTopicPerms
public boolean hasTopicPerms()
-
getTopicPerms
public java.lang.String getTopicPerms()
- Specified by:
getTopicPermsin interfaceStreamDescriptor- Returns:
- the topic permission ace.
-
setTopicPerms
public void setTopicPerms(java.lang.String perms)
Description copied from interface:StreamDescriptorSets the topic permission ace.- Specified by:
setTopicPermsin interfaceStreamDescriptor- Parameters:
perms- the topic permission ace.
-
hasCopyPerms
public boolean hasCopyPerms()
-
getCopyPerms
public java.lang.String getCopyPerms()
- Specified by:
getCopyPermsin interfaceStreamDescriptor- Returns:
- the copy permission ace.
-
setCopyPerms
public void setCopyPerms(java.lang.String perms)
Description copied from interface:StreamDescriptorSets the copy permission ace.- Specified by:
setCopyPermsin interfaceStreamDescriptor- Parameters:
perms- the copy permission ace.
-
hasAdminPerms
public boolean hasAdminPerms()
-
getAdminPerms
public java.lang.String getAdminPerms()
- Specified by:
getAdminPermsin interfaceStreamDescriptor- Returns:
- the admin permission ace.
-
setAdminPerms
public void setAdminPerms(java.lang.String perms)
Description copied from interface:StreamDescriptorSets the admin permission ace.- Specified by:
setAdminPermsin interfaceStreamDescriptor- Parameters:
perms- the admin permission ace.
-
hasIsChangelog
public boolean hasIsChangelog()
-
setIsChangelog
public void setIsChangelog(boolean ischglog)
Description copied from interface:StreamDescriptorSets the type of the stream to be Changelog.- Specified by:
setIsChangelogin interfaceStreamDescriptor
-
getIsChangelog
public boolean getIsChangelog()
- Specified by:
getIsChangelogin interfaceStreamDescriptor- Returns:
trueif this stream is changelog type.
-
hasTimestampType
public boolean hasTimestampType()
-
setDefaultTimestampType
public void setDefaultTimestampType(TimestampType timestampType)
Description copied from interface:StreamDescriptorSets timestamp type- Specified by:
setDefaultTimestampTypein interfaceStreamDescriptor- Parameters:
timestampType- can be CREATE_TIME or LOG_APPEND_TIME
-
getDefaultTimestampType
public TimestampType getDefaultTimestampType()
- Specified by:
getDefaultTimestampTypein interfaceStreamDescriptor- Returns:
- timestampType
-
hasCompact
public boolean hasCompact()
-
setCompact
public void setCompact(boolean logCompaction)
Description copied from interface:StreamDescriptorSets the log compaction on stream.- Specified by:
setCompactin interfaceStreamDescriptor
-
getCompact
public boolean getCompact()
Description copied from interface:StreamDescriptorGets log compaction on a stream.- Specified by:
getCompactin interfaceStreamDescriptor- Returns:
trueif stream has log compaction set.
-
setForce
public void setForce()
- Specified by:
setForcein interfaceStreamDescriptor
-
getForce
public boolean getForce()
- Specified by:
getForcein interfaceStreamDescriptor
-
hasMinCompactionLagMS
public boolean hasMinCompactionLagMS()
-
getMinCompactionLagMS
public long getMinCompactionLagMS()
Description copied from interface:StreamDescriptorApplies only if log compaction is enabled on the stream.- Specified by:
getMinCompactionLagMSin interfaceStreamDescriptor- Returns:
- The minimum time in millisecond a message will remain uncompacted in the topic-partition.
-
setMinCompactionLagMS
public void setMinCompactionLagMS(long ts)
Description copied from interface:StreamDescriptorSet time in millisecond a message should remain uncompacted in the topic-partition.Applies only if log compaction is enabled on the stream.- Specified by:
setMinCompactionLagMSin interfaceStreamDescriptor- Parameters:
ts- time in milliseconds
-
hasCompactionThrottleFactor
public boolean hasCompactionThrottleFactor()
-
getCompactionThrottleFactor
public long getCompactionThrottleFactor()
- Specified by:
getCompactionThrottleFactorin interfaceStreamDescriptor
-
setCompactionThrottleFactor
public void setCompactionThrottleFactor(long tf)
- Specified by:
setCompactionThrottleFactorin interfaceStreamDescriptor
-
hasDeleteRetentionMS
public boolean hasDeleteRetentionMS()
-
getDeleteRetentionMS
public long getDeleteRetentionMS()
Description copied from interface:StreamDescriptorApplies only if log compaction is enabled on the stream.- Specified by:
getDeleteRetentionMSin interfaceStreamDescriptor- Returns:
- The time in millisecond for which delete records are retained.
-
setDeleteRetentionMS
public void setDeleteRetentionMS(long ts)
Description copied from interface:StreamDescriptorSet the time in millisecond for which delete records are retained. Applies only if log compaction is enabled on the stream.- Specified by:
setDeleteRetentionMSin interfaceStreamDescriptor- Parameters:
ts- time in milliseconds
-
hasProducerIdExpirySecs
public boolean hasProducerIdExpirySecs()
-
setProducerIdExpirySecs
public void setProducerIdExpirySecs(long producerIdExpirySecs)
Description copied from interface:StreamDescriptorSets the producer id expiry- Specified by:
setProducerIdExpirySecsin interfaceStreamDescriptor- Parameters:
producerIdExpirySecs- the producer id expiry in secs.
-
getProducerIdExpirySecs
public long getProducerIdExpirySecs()
- Specified by:
getProducerIdExpirySecsin interfaceStreamDescriptor- Returns:
- the producer id expiry in secs
-
setKafkaTopic
public void setKafkaTopic(boolean kafkaTopic)
Description copied from interface:StreamDescriptorSets if the stream is a kafka topic stream.- Specified by:
setKafkaTopicin interfaceStreamDescriptor
-
isKafkaTopic
public boolean isKafkaTopic()
- Specified by:
isKafkaTopicin interfaceStreamDescriptor- Returns:
- If the stream is a kafka topic stream.
-
-