Package com.mapr.kafka.eventstreams
Interface StreamDescriptor
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Implementing Classes:
MStreamDescriptor
public interface StreamDescriptor extends java.lang.CloneableA StreamDescriptor contains the details about a stream such as the ttl, compression algo, default number of partitions per topic and so on.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAdminPerms()booleangetAutoCreateTopics()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()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.voidsetCompact(boolean compact)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 numPartitions)Sets the default number of partitions per topic.voidsetDefaultTimestampType(TimestampType logAppendTime)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
-
getDefaultPartitions
int getDefaultPartitions()
- Returns:
- the default number of partitions per topic.
-
setDefaultPartitions
void setDefaultPartitions(int numPartitions)
Sets the default number of partitions per topic.- Parameters:
numPartitions- the number of partitions
-
getTimeToLiveSec
long getTimeToLiveSec()
- Returns:
- time-to-live for messages in seconds.
-
setTimeToLiveSec
void setTimeToLiveSec(long sec)
Sets the time-to-live for messages.- Parameters:
sec- the time to live
-
getCompressionAlgo
java.lang.String getCompressionAlgo()
- Returns:
- the compression algo.
-
setCompressionAlgo
void setCompressionAlgo(java.lang.String algo)
Sets the compression algo.- Parameters:
algo- the compression algorithm name.
-
getAutoCreateTopics
boolean getAutoCreateTopics()
- Returns:
trueif topics should be auto-created when a message is produced.
-
setAutoCreateTopics
void setAutoCreateTopics(boolean allow)
Sets if topics should be auto-created when a message is produced.- Parameters:
allow-trueif topics should be auto-created.
-
getProducePerms
java.lang.String getProducePerms()
- Returns:
- the producer permission ace.
-
setProducePerms
void setProducePerms(java.lang.String perms)
Sets the producer permission ace.- Parameters:
perms- the producer permission ace.
-
getConsumePerms
java.lang.String getConsumePerms()
- Returns:
- the consume permission ace.
-
setConsumePerms
void setConsumePerms(java.lang.String perms)
Sets the consume permission ace.- Parameters:
perms- the consume permission ace.
-
getTopicPerms
java.lang.String getTopicPerms()
- Returns:
- the topic permission ace.
-
setTopicPerms
void setTopicPerms(java.lang.String perms)
Sets the topic permission ace.- Parameters:
perms- the topic permission ace.
-
getCopyPerms
java.lang.String getCopyPerms()
- Returns:
- the copy permission ace.
-
setCopyPerms
void setCopyPerms(java.lang.String perms)
Sets the copy permission ace.- Parameters:
perms- the copy permission ace.
-
getAdminPerms
java.lang.String getAdminPerms()
- Returns:
- the admin permission ace.
-
setAdminPerms
void setAdminPerms(java.lang.String perms)
Sets the admin permission ace.- Parameters:
perms- the admin permission ace.
-
setIsChangelog
void setIsChangelog(boolean ischglog)
Sets the type of the stream to be Changelog.
-
getIsChangelog
boolean getIsChangelog()
- Returns:
trueif this stream is changelog type.
-
setDefaultTimestampType
void setDefaultTimestampType(TimestampType logAppendTime)
Sets timestamp type- Parameters:
logAppendTime- can be CREATE_TIME or LOG_APPEND_TIME
-
getDefaultTimestampType
TimestampType getDefaultTimestampType()
- Returns:
- timestampType
-
setCompact
void setCompact(boolean compact)
Sets the log compaction on stream.
-
getCompact
boolean getCompact()
Gets log compaction on a stream.- Returns:
trueif stream has log compaction set.
-
setForce
void setForce()
-
getForce
boolean getForce()
-
getMinCompactionLagMS
long getMinCompactionLagMS()
Applies only if log compaction is enabled on the stream.- Returns:
- The minimum time in millisecond a message will remain uncompacted in the topic-partition.
-
setMinCompactionLagMS
void setMinCompactionLagMS(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.- Parameters:
ts- time in milliseconds
-
getCompactionThrottleFactor
long getCompactionThrottleFactor()
-
setCompactionThrottleFactor
void setCompactionThrottleFactor(long tf)
-
getDeleteRetentionMS
long getDeleteRetentionMS()
Applies only if log compaction is enabled on the stream.- Returns:
- The time in millisecond for which delete records are retained.
-
setDeleteRetentionMS
void setDeleteRetentionMS(long ts)
Set the time in millisecond for which delete records are retained. Applies only if log compaction is enabled on the stream.- Parameters:
ts- time in milliseconds
-
setProducerIdExpirySecs
void setProducerIdExpirySecs(long producerIdExpirySecs)
Sets the producer id expiry- Parameters:
producerIdExpirySecs- the producer id expiry in secs.
-
getProducerIdExpirySecs
long getProducerIdExpirySecs()
- Returns:
- the producer id expiry in secs
-
isKafkaTopic
boolean isKafkaTopic()
- Returns:
- If the stream is a kafka topic stream.
-
setKafkaTopic
void setKafkaTopic(boolean kafkaTopic)
Sets if the stream is a kafka topic stream.- Parameters:
isKafkaTopic- if the stream is a kafka topic stream.
-
-