public class ConsumerWorkingSet extends Object
Constructor and Description |
---|
ConsumerWorkingSet()
Constructs an empty working set.
|
Modifier and Type | Method and Description |
---|---|
void |
addPartition(PartitionKey partitionKey)
Adds a new partition to the working set.
|
boolean |
equals(Object o) |
static ConsumerWorkingSet |
fromBytes(byte[] bytes) |
List<ConsumablePartition> |
getPartitions() |
int |
hashCode() |
ConsumablePartition |
lookup(PartitionKey partitionKey) |
void |
populate(PartitionedFileSet partitionedFileSet,
ConsumerConfiguration configuration)
Populates the ConsumerWorkingSet by fetching partitions from the given PartitionedFileSet.
|
ConsumablePartition |
remove(PartitionKey partitionKey) |
byte[] |
toBytes() |
public List<ConsumablePartition> getPartitions()
public void addPartition(PartitionKey partitionKey)
public ConsumablePartition remove(PartitionKey partitionKey)
public ConsumablePartition lookup(PartitionKey partitionKey)
public void populate(PartitionedFileSet partitionedFileSet, ConsumerConfiguration configuration)
partitionedFileSet
- the PartitionedFileSet to fetch partitions fromconfiguration
- the ConsumerConfiguration which defines parameters for consumingpublic static ConsumerWorkingSet fromBytes(byte[] bytes)
public byte[] toBytes()
Copyright © 2022 Cask Data, Inc. Licensed under the Apache License, Version 2.0.