public class ClientLayerPersister extends PersistentJobRunnerImpl
PersistentJobRunner.CheckpointLock
serializeCheckpoints
Constructor and Description |
---|
ClientLayerPersister(Executor executor,
Ticker ticker,
Node node,
NodeClientCore core,
PersistentTempBucketFactory persistentTempFactory,
TempBucketFactory tempBucketFactory,
PersistentStatsPutter stats)
Load everything.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteAllFiles() |
void |
disableWrite() |
java.io.File |
getWriteFilename() |
protected void |
innerCheckpoint(boolean shutdown) |
boolean |
newSalt()
For persistent requests, return true if the bloom filter salt has changed when loading the
requests.
|
void |
panic() |
protected void |
save(boolean shutdown) |
void |
setFilesAndLoad(java.io.File dir,
java.lang.String baseName,
boolean writeEncrypted,
boolean noWrite,
DatabaseKey encryptionKey,
ClientContext context,
RequestStarterGroup requestStarters,
java.util.Random random)
Set the files to write to and set up encryption
|
checkpointOffThread, delayedCheckpoint, getClientContext, handleCompletion, hasLoaded, isKilledOrNotLoaded, killAndWaitForNotRunning, killAndWaitForNotWriting, lock, onLoading, onStarted, queue, queueInternal, queueInternal, queueNormalOrDrop, setCheckpointASAP, shutdown, shuttingDown, start, updateLastCheckpointed, waitAndCheckpoint, waitForIdleAndCheckpoint, waitForNotWriting
public ClientLayerPersister(Executor executor, Ticker ticker, Node node, NodeClientCore core, PersistentTempBucketFactory persistentTempFactory, TempBucketFactory tempBucketFactory, PersistentStatsPutter stats)
persistentTempFactory
- Only passed in so that we can call its pre- and post- commit
hooks. We don't explicitly save it; it must be populated lazily in onResume() like
everything else.public void setFilesAndLoad(java.io.File dir, java.lang.String baseName, boolean writeEncrypted, boolean noWrite, DatabaseKey encryptionKey, ClientContext context, RequestStarterGroup requestStarters, java.util.Random random) throws MasterKeysWrongPasswordException
noWrite
- If true, don't write the data to disk at all, and delete existing
client.dat*.MasterKeysWrongPasswordException
- If we need the encryption key but it has not been
supplied.protected void innerCheckpoint(boolean shutdown)
innerCheckpoint
in class PersistentJobRunnerImpl
protected void save(boolean shutdown)
public boolean newSalt()
PersistentJobRunner
public java.io.File getWriteFilename()
public void panic()
public void deleteAllFiles()
public void disableWrite()
disableWrite
in class PersistentJobRunnerImpl