Package org.conscrypt
Class FileClientSessionCache
java.lang.Object
org.conscrypt.FileClientSessionCache
File-based cache implementation. Only one process should access the
underlying directory at a time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
A file containing a piece of cached data.(package private) static class
This cache creates one file per SSL session using "host.port" for the file name. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
reset()
For testing.static SSLClientSessionCache
usingDirectory
(File directory) Returns a cache backed by the given directory.
-
Field Details
-
logger
-
MAX_SIZE
public static final int MAX_SIZE- See Also:
-
caches
Maps directories to the cache instances that are backed by those directories. We synchronize access using the cache instance, so it's important that everyone shares the same instance.
-
-
Constructor Details
-
FileClientSessionCache
private FileClientSessionCache()
-
-
Method Details
-
usingDirectory
Returns a cache backed by the given directory. Creates the directory (including parent directories) if necessary. This cache should have exclusive access to the given directory.- Parameters:
directory
- to store files in- Returns:
- a cache backed by the given directory
- Throws:
IOException
- if the file exists and is not a directory or if creating the directories fails
-
reset
static void reset()For testing.
-