# Uses of Interface
org.apache.datasketches.common.MemorySegmentRequest

Packages that use MemorySegmentRequest
Package
Description
org.apache.datasketches.common
This package is for common classes that may be used across all the sketch families.
org.apache.datasketches.kll
This package is for the implementations of the sketch algorithm developed by Zohar Karnin, Kevin Lang, and Edo Liberty that is commonly referred to as the "KLL" sketch after the authors' last names.
org.apache.datasketches.quantiles
The quantiles package contains stochastic streaming algorithms that enable single-pass analysis of the distribution of a stream of quantiles.
org.apache.datasketches.theta
The theta package contains the basic sketch classes that are members of the Theta-Sketch Framework.

## Uses of MemorySegmentRequest in org.apache.datasketches.common

Classes in org.apache.datasketches.common that implement MemorySegmentRequest
Modifier and Type
Class
Description
`static class`
`MemorySegmentRequest.Default`
A convenience class that implements a default implementation.
`final class`
`MemorySegmentRequestExample`
This is an example of a possible implementation of the MemorySegmentRequest interface where all requested segments are allocated off-heap.

## Uses of MemorySegmentRequest in org.apache.datasketches.kll

Methods in org.apache.datasketches.kll with parameters of type MemorySegmentRequest
Modifier and Type
Method
Description
`static KllDoublesSketch`
KllDoublesSketch.`newDirectInstance(int k, MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
Create a new direct updatable instance of this sketch with a given k.
`static KllFloatsSketch`
KllFloatsSketch.`newDirectInstance(int k, MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
Create a new direct updatable instance of this sketch with a given k.
`static KllLongsSketch`
KllLongsSketch.`newDirectInstance(int k, MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
Create a new direct updatable instance of this sketch with a given k.
`static KllDoublesSketch`
KllDoublesSketch.`wrap(MemorySegment srcSeg, MemorySegmentRequest mSegReq)`
Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch and including an optional, user defined `MemorySegmentRequest`.
`static KllFloatsSketch`
KllFloatsSketch.`wrap(MemorySegment srcSeg, MemorySegmentRequest mSegReq)`
Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch and including an optional, user defined `MemorySegmentRequest`.
`static KllLongsSketch`
KllLongsSketch.`wrap(MemorySegment srcSeg, MemorySegmentRequest mSegReq)`
Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch and including an optional, user defined `MemorySegmentRequest`.

## Uses of MemorySegmentRequest in org.apache.datasketches.quantiles

Methods in org.apache.datasketches.quantiles with parameters of type MemorySegmentRequest
Modifier and Type
Method
Description
`UpdatableQuantilesDoublesSketch`
QuantilesDoublesSketchBuilder.`build(MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
Returns a UpdatableQuantilesDoublesSketch with the current configuration of this builder and the specified backing destination MemorySegment store that can grow.
`QuantilesDoublesUnion`
QuantilesDoublesUnionBuilder.`build(MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
Returns a new empty Union object with the current configuration of this Builder and the specified backing destination MemorySegment store.
`QuantilesDoublesSketch`
QuantilesDoublesSketch.`downSample(QuantilesDoublesSketch srcSketch, int smallerK, MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
From an source sketch, create a new sketch that must have a smaller K.
`abstract UpdatableQuantilesDoublesSketch`
QuantilesDoublesUnion.`getResult(MemorySegment dstSeg, MemorySegmentRequest mSegReq)`
Places the result of this Union into the provided MemorySegment as an UpdatableQuantilesDoublesSketch, which enables further update operations on the resulting sketch.
`static QuantilesDoublesUnion`
QuantilesDoublesUnion.`wrap(MemorySegment srcSeg, MemorySegmentRequest mSegReq)`
Returns an updatable Union object that wraps the given MemorySegment that contains an image of a QuantilesDoublesSketch.
`static UpdatableQuantilesDoublesSketch`
UpdatableQuantilesDoublesSketch.`wrap(MemorySegment srcSeg, MemorySegmentRequest mSegReq)`
Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch and including an optional, user defined `MemorySegmentRequest`.
`static QuantilesDoublesSketch`
QuantilesDoublesSketch.`writableWrap(MemorySegment srcSeg, MemorySegmentRequest mSegReq)`
Wrap this sketch around the given MemorySegment image of an updatable QuantilesDoublesSketch.

## Uses of MemorySegmentRequest in org.apache.datasketches.theta

Methods in org.apache.datasketches.theta that return MemorySegmentRequest
Modifier and Type
Method
Description
`MemorySegmentRequest`
UpdatableThetaSketchBuilder.`getMemorySegmentRequest()`
Returns the local MemorySegmentRequest
Methods in org.apache.datasketches.theta with parameters of type MemorySegmentRequest
Modifier and Type
Method
Description
`UpdatableThetaSketchBuilder`
UpdatableThetaSketchBuilder.`setMemorySegmentRequest(MemorySegmentRequest mSegReq)`
Sets the local MemorySegmentRequest
`static UpdatableThetaSketch`
UpdatableThetaSketch.`wrap(MemorySegment srcWSeg, MemorySegmentRequest mSegReq, long expectedSeed)`
Wrap takes the sketch image in MemorySegment and refers to it directly.