Package io.grpc
Class CompressorRegistry
- java.lang.Object
-
- io.grpc.CompressorRegistry
-
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1704") @ThreadSafe public final class CompressorRegistry extends Object
Encloses classes related to the compression and decompression of messages.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompressorRegistry
getDefaultInstance()
Returns the default instance used by gRPC when the registry is not specified.Compressor
lookupCompressor(String compressorName)
static CompressorRegistry
newEmptyInstance()
Returns a new instance with no registered compressors.void
register(Compressor c)
Registers a compressor for both decompression and message encoding negotiation.
-
-
-
Method Detail
-
getDefaultInstance
public static CompressorRegistry getDefaultInstance()
Returns the default instance used by gRPC when the registry is not specified. Currently the registry just contains support for gzip.
-
newEmptyInstance
public static CompressorRegistry newEmptyInstance()
Returns a new instance with no registered compressors.
-
lookupCompressor
@Nullable public Compressor lookupCompressor(String compressorName)
-
register
public void register(Compressor c)
Registers a compressor for both decompression and message encoding negotiation.- Parameters:
c
- The compressor to register
-
-