K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.public class CacheBasedDatasetBuilder<K,V> extends Object implements DatasetBuilder<K,V>
CacheBasedDataset
. Encapsulate logic of building cache based dataset such as
allocation required data structures and initialization of context
part of partitions.Constructor and Description |
---|
CacheBasedDatasetBuilder(Ignite ignite,
IgniteCache<K,V> upstreamCache)
Constructs a new instance of cache based dataset builder that makes
CacheBasedDataset with default
predicate that passes all upstream entries to dataset. |
CacheBasedDatasetBuilder(Ignite ignite,
IgniteCache<K,V> upstreamCache,
IgniteBiPredicate<K,V> filter)
Constructs a new instance of cache based dataset builder that makes
CacheBasedDataset . |
Modifier and Type | Method and Description |
---|---|
<C extends Serializable,D extends AutoCloseable> |
build(PartitionContextBuilder<K,V,C> partCtxBuilder,
PartitionDataBuilder<K,V,C,D> partDataBuilder)
Constructs a new instance of
Dataset that includes allocation required data structures and
initialization of context part of partitions. |
DatasetBuilder<K,V> |
withFilter(IgniteBiPredicate<K,V> filterToAdd)
Returns new instance of DatasetBuilder using conjunction of internal filter and
filterToAdd . |
public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache<K,V> upstreamCache)
CacheBasedDataset
with default
predicate that passes all upstream entries to dataset.ignite
- Ignite instance.upstreamCache
- Ignite Cache with upstream
data.public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache<K,V> upstreamCache, IgniteBiPredicate<K,V> filter)
CacheBasedDataset
.ignite
- Ignite instance.upstreamCache
- Ignite Cache with upstream
data.filter
- Filter for upstream
data.public <C extends Serializable,D extends AutoCloseable> CacheBasedDataset<K,V,C,D> build(PartitionContextBuilder<K,V,C> partCtxBuilder, PartitionDataBuilder<K,V,C,D> partDataBuilder)
Dataset
that includes allocation required data structures and
initialization of context
part of partitions.build
in interface DatasetBuilder<K,V>
C
- Type of a partition context
.D
- Type of a partition data
.partCtxBuilder
- Partition context
builder.partDataBuilder
- Partition data
builder.public DatasetBuilder<K,V> withFilter(IgniteBiPredicate<K,V> filterToAdd)
filterToAdd
.withFilter
in interface DatasetBuilder<K,V>
filterToAdd
- Additional filter.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019