Search in sources :

Example 1 with KafkaTopicStatusBuilder

use of io.strimzi.api.kafka.model.status.KafkaTopicStatusBuilder in project strimzi by strimzi.

the class MockK8s method updateResourceStatus.

@Override
public Future<KafkaTopic> updateResourceStatus(Reconciliation reconciliation, KafkaTopic topicResource) {
    statuses.add(new KafkaTopicStatusBuilder(topicResource.getStatus()).build());
    Long generation = topicResource.getMetadata().getGeneration();
    return Future.succeededFuture(new KafkaTopicBuilder(topicResource).editMetadata().withGeneration(generation == null ? 1 : generation + 1).endMetadata().build());
}
Also used : KafkaTopicStatusBuilder(io.strimzi.api.kafka.model.status.KafkaTopicStatusBuilder) KafkaTopicBuilder(io.strimzi.api.kafka.model.KafkaTopicBuilder)

Example 2 with KafkaTopicStatusBuilder

use of io.strimzi.api.kafka.model.status.KafkaTopicStatusBuilder in project strimzi-kafka-operator by strimzi.

the class MockK8s method updateResourceStatus.

@Override
public Future<KafkaTopic> updateResourceStatus(Reconciliation reconciliation, KafkaTopic topicResource) {
    statuses.add(new KafkaTopicStatusBuilder(topicResource.getStatus()).build());
    Long generation = topicResource.getMetadata().getGeneration();
    return Future.succeededFuture(new KafkaTopicBuilder(topicResource).editMetadata().withGeneration(generation == null ? 1 : generation + 1).endMetadata().build());
}
Also used : KafkaTopicStatusBuilder(io.strimzi.api.kafka.model.status.KafkaTopicStatusBuilder) KafkaTopicBuilder(io.strimzi.api.kafka.model.KafkaTopicBuilder)

Aggregations

KafkaTopicBuilder (io.strimzi.api.kafka.model.KafkaTopicBuilder)2 KafkaTopicStatusBuilder (io.strimzi.api.kafka.model.status.KafkaTopicStatusBuilder)2