public abstract class AbstractSnapshotStatement extends AbstractStatement
AbstractStatement
providing functionality
useful for generic snapshot statements.Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
protected String |
f_sServiceName
Service name to carry out operations for.
|
protected String |
f_sSnapshotName
Snapshot name to utilize.
|
static SimpleDateFormat |
MONTH_NAME
Format month name.
|
protected static String |
SUCCESS
Result to output on command success.
|
static SimpleDateFormat |
WEEKDAY_NAME
Format weekday name.
|
Constructor and Description |
---|
AbstractSnapshotStatement(String sSnapshotName,
String sServiceName)
Create a AbstractSnapshotStatement that will prove base functionality for
other snapshot commands.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getConfirmationMessage(String sAction)
Return a confirmation message.
|
protected static String |
replaceDateMacros(String sSnapshotName)
Replace the following macro's for the snapshot name:
%y - Year %m - Month %d - Day of month %w - Day of week. mon,tues,wed, etc %M - Month name - Jan, Feb, etc %hh - Hour %mm - Minute |
void |
showPlan(PrintWriter out)
Output to the provided
PrintWriter a human readable trace of the
actions that will be taken by this statement if or when executed. |
protected void |
validateArchivedSnapshotExistsForService(PersistenceToolsHelper helper)
Validate that an archived snapshot f_sSnapshotName exists for the given service
f_sServiceName.
|
protected void |
validateServiceExists(PersistenceToolsHelper helper)
Validate that the service f_sServiceName exists.
|
protected void |
validateSnapshotExistsForService(PersistenceToolsHelper helper)
Validate that a snapshot f_sSnapshotName exists for the given service
f_sServiceName.
|
protected void |
validateSnapshotName(String sSnapshotName)
Validate that the snapshot name conforms to standard.
|
assertCacheName, getExecutionConfirmation, sanityCheck
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, isManagingTimeout
protected static final String SUCCESS
public static final SimpleDateFormat MONTH_NAME
public static final SimpleDateFormat WEEKDAY_NAME
protected final String f_sSnapshotName
protected final String f_sServiceName
public void showPlan(PrintWriter out)
Statement
PrintWriter
a human readable trace of the
actions that will be taken by this statement if or when executed.out
- the PrintWriter to write the trace toprotected String getConfirmationMessage(String sAction)
sAction
- the action to be performedprotected void validateSnapshotName(String sSnapshotName) throws CohQLException
sSnapshotName
- the name of snapshot to validateCohQLException
- if the name is not validprotected void validateServiceExists(PersistenceToolsHelper helper)
helper
- the PersistenceToolsHelper
instance to use to validateprotected void validateSnapshotExistsForService(PersistenceToolsHelper helper)
helper
- the PersistenceToolsHelper
instance to use to validateprotected void validateArchivedSnapshotExistsForService(PersistenceToolsHelper helper)
helper
- the PersistenceToolsHelper
instance to use to validateprotected static String replaceDateMacros(String sSnapshotName)
sSnapshotName
- the snapshot name to replace macros