public class DanglingObjectAVCleanupAgent extends BaseAgent
IfsServer.ServerRequest
Modifier and Type | Field and Description |
---|---|
static String |
BATCH_SIZE |
static String |
DANGLINGCOUNTCUMULATIVE |
static String |
DANGLINGCOUNTLASTACTIVATION |
static String |
EXCLUDEDATTRIBUTES |
protected int |
m_DanglingRowsCumulative
The number of dangling rows this agent cleared since starting.
|
ERROR_COUNT_CUMULATIVE, ERROR_COUNT_LAST_ACTIVATION
LEVEL_HIGH, LEVEL_LOW, LEVEL_MEDIUM, LEVEL_OFF
SERVERSTATUS_DISPOSED, SERVERSTATUS_RUNNING, SERVERSTATUS_STARTING, SERVERSTATUS_STOPPED, SERVERSTATUS_STOPPING, SERVERSTATUS_SUSPENDED, SERVERSTATUS_UNKNOWN
Constructor and Description |
---|
DanglingObjectAVCleanupAgent()
Constructs the DanglingObjectAVCleanupAgent.
|
Modifier and Type | Method and Description |
---|---|
protected void |
activate()
Perform garbage collection.
|
static int |
cleanupAllArrayReferences(LibrarySession session,
String[] exclusions,
int batchSize,
boolean bestEffort)
Fix broken array references for all array LibraryObject type Attributes.
|
static int |
cleanupAllScalarReferences(LibrarySession session,
String[] exclusions,
int batchSize,
boolean bestEffort)
Fix broken scalar references for all scalar LibraryObject type Attributes.
|
static int |
cleanupArrayReferences(LibrarySession session,
Attribute attr,
Long attrId,
int batchSize)
Fix broken array references for the specified Attribute.
|
static int |
cleanupScalarReferences(LibrarySession session,
Attribute attr,
int batchSize)
Fix broken scalar references for the specified Attribute.
|
IfsLogger |
getLogger()
Gets the appropriate logger for this server.
|
void |
initialize()
Register detailed status information into our ServerDetail.
|
static void |
main(String[] args)
This is used to run the server in the standalone mode.
|
void |
preRun()
Read in properties from property table.
|
addToProperty, handleResumeRequest, handleStopRequest, handleSuspendRequest, handleTimerExpired, incrementProperty, initOnRun, isAgent, postRun, processWithinRun, publishProperty, run, standardPostRun, supportsSuspendResume
cancelRegistration, checkRegistration, deriveAgentIdentifier, deriveRunningServerIdentifier, getAgentIdentifier, getAgentIdentifierPrefix, getRegistrationPeriod, getRunningNodeIdentifier, getRunningNodeName, getRunningServerIdentifier, initializeRegistration, isRegistered, isServerRunning, isTokenNonCompeting
checkSession, connectSession, constructSession, convertTimerInterval, convertTimerInterval, convertTimerInterval, dispose, getLastTimerActivation, getNextTimerActivation, getService, getTimerActivationPeriod, getTimerClassName, getTimerConfiguration, handlePriorityChangeRequest, handlePropertyChangeRequest, handlePropertyChangeRequest, handleRequest, handleRequests, handleServerStateControllerRequest, isNonCompeting, isPropertyReadonly, isServiceAvailable, isTimerActive, postCheckServerStateRequest, postRequest, processEvent, processEvents, queueEvent, resetTimer, restart, resume, serviceAvailabilityCheckNeeded, setPriority, setProperty, setProperty, start, startTimer, stop, stopRequested, stopTimer, suspend, timerExpired, waitForServiceAvailability, waitServer
acquireSession, constructLibrarySessionPool, createServerState, deregister, disconnectSession, getConfigurationOverridesTable, getConfigurationTable, getCredential, getDesiredStatus, getIfsHome, getInitialConfigurationTable, getLoggerForLegacyLogging, getName, getNode, getNodeName, getOracleHome, getParameterTable, getPriority, getProperties, getProperty, getServerConfigurationName, getServerState, getServerStateValue, getServerType, getServiceName, getSession, getStateTable, getStatus, getSystemUserCredential, handleServerConfigurationOverrideRequest, handleServerStateEvent, initialize, initialize, isDisposed, isInitialized, isLogged, log, log, log, releaseSession, releaseSession, setDesiredStatus, setDesiredStatus, setSessionTimeoutPrevented, setStateProperty, setStatus, startStandalone, startStandalone, supportsPriority, toStatusLabel, toStatusLabel, toStatusLabel, verifyNotDisposed, verifyNotDisposed
public static final String EXCLUDEDATTRIBUTES
public static final String BATCH_SIZE
public static final String DANGLINGCOUNTCUMULATIVE
public static final String DANGLINGCOUNTLASTACTIVATION
protected int m_DanglingRowsCumulative
public DanglingObjectAVCleanupAgent() throws IfsException
IfsException
- if the operation failspublic static void main(String[] args) throws Exception
args
- Commandline argumentsException
- if the operation failspublic IfsLogger getLogger()
Typically overridden by subclasses to return the IfsLogger associatged with the specific server.
public void preRun() throws Exception
public void initialize() throws Exception
This is called automatically from within register() after a successful registration. The implementation in IfsAgent publishes the status and priority information; subclasses will often extend this to publish other agent information.
initialize
in class BaseAgent
Exception
- if the operation failsprotected void activate() throws IfsException
activate
in class BaseAgent
IfsException
- if the operation failspublic static int cleanupAllScalarReferences(LibrarySession session, String[] exclusions, int batchSize, boolean bestEffort) throws IfsException
This will change a broken reference value to 0 in the column of all scalar LibraryObject type Attributes, except for those indicated to be "skipped".
session
- the session contextexclusions
- the array of class-qualified Attribute names
that should be excluded; contains strings like
"PublicObject.Owner"batchSize
- the batch size to use while processingbestEffort
- true if exceptions should just be caught and logged;
false if they are thrownIfsException
- if the operation failspublic static int cleanupAllArrayReferences(LibrarySession session, String[] exclusions, int batchSize, boolean bestEffort) throws IfsException
This will change a broken reference value to 0 in the column of all array LibraryObject type Attributes, except for those indicated to be "skipped".
session
- the session contextexclusions
- the array of class-qualified Attribute names
that should be excluded; contains strings like
"PublicObject.Owner"batchSize
- the batch size to use while processingbestEffort
- true if exceptions should just be caught and logged;
false if they are thrownIfsException
- if the operation failspublic static int cleanupScalarReferences(LibrarySession session, Attribute attr, int batchSize) throws IfsException
This will change a broken reference value to 0 in the column of the Attribute specified.
session
- the session contextattr
- the Attribute to processbatchSize
- the batch size to use while processingIfsException
- if the operation failspublic static int cleanupArrayReferences(LibrarySession session, Attribute attr, Long attrId, int batchSize) throws IfsException
This will change a broken reference value to 0 in the array table's value column of the, in the array table indicated by the Attribute specified.
session
- the session contextattr
- the Attribute to processattrId
- the Attribute ID; non-null only for SimpleObject arraysbatchSize
- the batch size to use while processingIfsException
- if the operation failsCopyright © 2023. All rights reserved.