public interface Environment extends AutoCloseable
Environment is the main entry point to a node or a cluster of nodes. Producer
and Consumer instances are created from an Environment instance. An Environment can also create and delete streams.
Applications are supposed to use a single Environment instance to interact with a
cluster.
Use builder() to configure and create an Environment instance.
Environment instances are expected to be thread-safe.
EnvironmentBuilder| Modifier and Type | Method and Description |
|---|---|
static EnvironmentBuilder |
builder()
Create a builder to configure and create an
Environment |
void |
close()
Close the environment and its resources.
|
ConsumerBuilder |
consumerBuilder()
Create a
ConsumerBuilder to configure and create a Consumer |
void |
deleteStream(String stream)
Delete a stream
|
ProducerBuilder |
producerBuilder()
Create a
ProducerBuilder to configure and create a Producer. |
StreamCreator |
streamCreator()
Return a
StreamCreator to configure and create a stream. |
static EnvironmentBuilder builder()
EnvironmentEnvironmentBuilderStreamCreator streamCreator()
StreamCreator to configure and create a stream.StreamCreatorvoid deleteStream(String stream)
stream - ProducerBuilder producerBuilder()
ProducerBuilder to configure and create a Producer.ProducerBuilderConsumerBuilder consumerBuilder()
ConsumerBuilder to configure and create a ConsumerConsumerBuildervoid close()
close in interface AutoCloseableCopyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.