Class NetscapeCookieFileCache
- java.lang.Object
-
- org.eclipse.jgit.internal.transport.http.NetscapeCookieFileCache
-
public class NetscapeCookieFileCache extends java.lang.ObjectA cache of all known cookie files (NetscapeCookieFile). May contain at mostnentries, 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 keyhttp.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
Fields Modifier and Type Field Description private LRUMap<java.nio.file.Path,NetscapeCookieFile>cookieFileMapprivate static NetscapeCookieFileCacheinstance
-
Constructor Summary
Constructors Modifier Constructor Description privateNetscapeCookieFileCache(HttpConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetscapeCookieFilegetEntry(java.nio.file.Path path)static NetscapeCookieFileCachegetInstance(HttpConfig config)
-
-
-
Field Detail
-
cookieFileMap
private final LRUMap<java.nio.file.Path,NetscapeCookieFile> cookieFileMap
-
instance
private static NetscapeCookieFileCache instance
-
-
Constructor Detail
-
NetscapeCookieFileCache
private NetscapeCookieFileCache(HttpConfig config)
-
-
Method Detail
-
getInstance
public static NetscapeCookieFileCache getInstance(HttpConfig config)
- Parameters:
config- the config which defines the limit for this cache- 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)
-
getEntry
public NetscapeCookieFile getEntry(java.nio.file.Path path)
- Parameters:
path- the path of the cookie file to retrieve- Returns:
- the cache entry belonging to the requested file
-
-