Top Description Fields Constructors Methods
org.eclipse.jgit.lib

public Class InflaterCache

extends Object
Class Inheritance
Imports
java.util.zip.Inflater

Creates zlib based inflaters as necessary for object decompression.

Field Summary

Modifier and TypeField and Description
private static final Inflater[]
private static int
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Inflater

Returns:

an available inflater. Never null.
get
()

Obtain an Inflater for decompression.

private static synchronized Inflater
public static void
release(Inflater
the inflater to return. May be null, in which case this method does nothing.
i
)

Release an inflater previously obtained from this cache.

private static synchronized boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

inflaterCacheback to summary
private static final Inflater[] inflaterCache
openInflaterCountback to summary
private static int openInflaterCount
SZback to summary
private static final int SZ

Constructor Detail

InflaterCacheback to summary
private InflaterCache()

Method Detail

getback to summary
public static Inflater get()

Obtain an Inflater for decompression.

Inflaters obtained through this cache should be returned (if possible) by release(Inflater) to avoid garbage collection and reallocation.

Returns:Inflater

an available inflater. Never null.

getImplback to summary
private static synchronized Inflater getImpl()
releaseback to summary
public static void release(Inflater i)

Release an inflater previously obtained from this cache.

Parameters
i:Inflater

the inflater to return. May be null, in which case this method does nothing.

releaseImplback to summary
private static synchronized boolean releaseImpl(Inflater i)