Top Description Fields Constructors Methods
org.eclipse.jgit.internal.transport.http

public Class NetscapeCookieFileCache

extends Object
Class Inheritance
Imports
java.nio.file.Path, org.eclipse.jgit.transport.HttpConfig, org.eclipse.jgit.util.LRUMap

A cache of all known cookie files (NetscapeCookieFile). May contain at most n entries, where the least-recently used one is evicted as soon as more entries are added. The maximum number of entries (=n) can be set via the git config key http.cookieFileCacheLimit. By default it is set to 10.

The cache is global, i.e. it is shared among all consumers within the same Java process.

See Also
NetscapeCookieFile

Field Summary

Modifier and TypeField and Description
private final LRUMap<Path, NetscapeCookieFile>
private static NetscapeCookieFileCache

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public NetscapeCookieFile

Returns:

the cache entry belonging to the requested file
getEntry
(Path
the path of the cookie file to retrieve
path
)

Get a cache entry

public static NetscapeCookieFileCache

Returns:

the singleton instance of the cookie file cache. If the cache has already been created the given config is ignored (even if it differs from the config, with which the cache has originally been created)
getInstance
(HttpConfig
the config which defines the limit for this cache
config
)

Get singleton instance

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cookieFileMapback to summary
private final LRUMap<Path, NetscapeCookieFile> cookieFileMap
instanceback to summary
private static NetscapeCookieFileCache instance

Constructor Detail

NetscapeCookieFileCacheback to summary
private NetscapeCookieFileCache(HttpConfig config)

Method Detail

getEntryback to summary
public NetscapeCookieFile getEntry(Path path)

Get a cache entry

Parameters
path:Path

the path of the cookie file to retrieve

Returns:NetscapeCookieFile

the cache entry belonging to the requested file

getInstanceback to summary
public static NetscapeCookieFileCache getInstance(HttpConfig config)

Get singleton instance

Parameters
config:HttpConfig

the config which defines the limit for this cache

Returns:NetscapeCookieFileCache

the singleton instance of the cookie file cache. If the cache has already been created the given config is ignored (even if it differs from the config, with which the cache has originally been created)