public final class Stamps extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Stamps.Updater
A callback interface to flush content of some cache at a suitable
point in time.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
asByteBuffer(String cache)
Opens the access to cache object as a stream.
|
MappedByteBuffer |
asMappedByteBuffer(String cache)
Getter for mmapped buffer access to the cache.
|
InputStream |
asStream(String cache)
Opens the access to cache object as a stream.
|
void |
discardCaches() |
boolean |
exists(String cache)
Checks whether a cache exists
|
void |
flush(int delay)
Flushes all caches.
|
static Stamps |
getModulesJARs()
Creates instance of stamp that checks timestamp for all files that affect
module classloading and related caches.
|
long |
lastModified()
Finds out the time of last modifications of files that influnce
this cache.
|
void |
scheduleSave(Stamps.Updater updater,
String cache,
boolean append)
Method for registering updates to caches.
|
void |
shutdown()
Waits for the worker to finish
|
public static Stamps getModulesJARs()
public long lastModified()
public boolean exists(String cache)
cache - name of the cachepublic InputStream asStream(String cache)
name - name of the cachepublic MappedByteBuffer asMappedByteBuffer(String cache)
cache - the file to accesspublic ByteBuffer asByteBuffer(String cache)
name - name of the cachepublic void scheduleSave(Stamps.Updater updater, String cache, boolean append)
updater - the callback to start when flushing cachesfile - name of the file to store the cache intoappend - write from scratch or append?public void flush(int delay)
delay - the delay to wait with starting the parsing, if zero, that also means
we want to wait for the end of parsingpublic void shutdown()
public void discardCaches()
Built on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.