Top Description Fields Constructors Methods
io.grpc

public final Class CompressorRegistry

extends Object
Class Inheritance
Annotations
@ExperimentalApi:https://github.com/grpc/grpc-java/issues/1704
@ThreadSafe
Static Imports
com.google.common.base.Preconditions.checkArgument

Encloses classes related to the compression and decompression of messages.

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<String, Compressor>
private static final CompressorRegistry

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static CompressorRegistry
getDefaultInstance()

Returns the default instance used by gRPC when the registry is not specified.

public Compressor
lookupCompressor(String compressorName)

public static CompressorRegistry
newEmptyInstance()

Returns a new instance with no registered compressors.

public void
register(Compressor
The compressor to register
c
)

Registers a compressor for both decompression and message encoding negotiation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compressorsback to summary
private final ConcurrentMap<String, Compressor> compressors
DEFAULT_INSTANCEback to summary
private static final CompressorRegistry DEFAULT_INSTANCE

Constructor Detail

CompressorRegistryback to summary
pack-priv CompressorRegistry(Compressor... cs)
Annotations
@VisibleForTesting

Method Detail

getDefaultInstanceback to summary
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.

lookupCompressorback to summary
public Compressor lookupCompressor(String compressorName)
Annotations
@Nullable
newEmptyInstanceback to summary
public static CompressorRegistry newEmptyInstance()

Returns a new instance with no registered compressors.

registerback to summary
public void register(Compressor c)

Registers a compressor for both decompression and message encoding negotiation.

Parameters
c:Compressor

The compressor to register