use of org.apache.apex.malhar.lib.utils.serde.BufferSlice in project apex-malhar by apache.
the class InMemSpillableStateStore method getSync.
@Override
public Slice getSync(long bucketId, @NotNull Slice key) {
Map<Slice, Slice> bucket = store.get(bucketId);
if (bucket == null) {
bucket = Maps.newHashMap();
store.put(bucketId, bucket);
}
if (key.getClass() == Slice.class) {
// The hashCode of Slice was not correct, so correct it
key = new BufferSlice(key);
}
return bucket.get(key);
}
Aggregations