public interface DriftManagerLocal extends DriftManagerRemote
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeSet(org.rhq.core.domain.auth.Subject subject,
int resourceId,
long zipSize,
InputStream zipStream)
This method initiates an out-of-band (JMS-Based) server-side pull of the change-set file.
|
void |
addFiles(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String driftDefName,
String token,
long zipSize,
InputStream zipStream)
This method initiates an out-of-band (JMS-Based) server-side pull of the drift file zip.
|
void |
deleteResourceDriftDefinition(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int driftDefId)
This is for internal use only - do not call it unless you know what you are doing.
|
void |
detectDrift(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
org.rhq.core.domain.drift.DriftDefinition driftDef)
One time on-demand request to detect drift on the specified entities, using the supplied def.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.drift.DriftComposite> |
findDriftCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.DriftCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.drift.DriftDefinitionComposite> |
findDriftDefinitionCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.DriftDefinitionCriteria criteria) |
org.rhq.core.domain.drift.DriftDefinition |
getDriftDefinition(org.rhq.core.domain.auth.Subject subject,
int driftDefId)
Get the specified drift definition.
|
org.rhq.core.domain.drift.DriftDetails |
getDriftDetails(org.rhq.core.domain.auth.Subject subject,
String driftId)
Returns an object that encapsulates the information needed for viewing drift details
|
org.rhq.core.domain.drift.DriftFile |
getDriftFile(org.rhq.core.domain.auth.Subject subject,
String hashId) |
String |
getDriftFileBits(org.rhq.core.domain.auth.Subject subject,
String hash)
Returns the content associated with the specified hash as a string
|
boolean |
isBinaryFile(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.drift.Drift<?,?> drift) |
String |
persistSnapshot(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.drift.DriftSnapshot snapshot,
org.rhq.core.domain.drift.DriftChangeSet<? extends org.rhq.core.domain.drift.Drift<?,?>> changeSet) |
void |
processRepeatChangeSet(int resourceId,
String driftDefName,
int version) |
void |
purgeByDriftDefinitionName(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String driftDefName)
When a user wants to completely remove all data related to a drift definition,
this method will be called to give the plugin a chance to clean up any data related
to the drift definition that is going to be deleted.
|
int |
purgeOrphanedDriftFiles(org.rhq.core.domain.auth.Subject subject,
long purgeMillis)
This will remove all drift files that are no longer referenced by drift entries.
|
DriftChangeSetSummary |
saveChangeSet(org.rhq.core.domain.auth.Subject subject,
int resourceId,
File changeSetZip) |
void |
saveChangeSetContent(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String driftDefName,
String token,
File changeSetFilesZip) |
void |
saveChangeSetFiles(org.rhq.core.domain.auth.Subject subject,
File changeSetFilesZip) |
void |
updateDriftDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.drift.DriftDefinition driftDefinition) |
void |
updateDriftDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext entityContext,
org.rhq.core.domain.drift.DriftDefinition driftDef)
Saves or updates the provided drift definition.
|
deleteDriftDefinition, findDriftChangeSetsByCriteria, findDriftDefinitionsByCriteria, findDriftsByCriteria, generateUnifiedDiff, generateUnifiedDiff, generateUnifiedDiffByIds, getDriftFileAsByteArray, getSnapshot, pinSnapshotvoid addChangeSet(org.rhq.core.domain.auth.Subject subject,
int resourceId,
long zipSize,
InputStream zipStream)
throws Exception
resourceId - The resource for which the change-set is being reported.zipSize - The size of the zip waiting to be streamed.zipStream - The change-set zip file streamExceptionvoid addFiles(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String driftDefName,
String token,
long zipSize,
InputStream zipStream)
throws Exception
resourceId - The resource from which the drift file is being supplied.zipSize - The size of the zip waiting to be streamed.zipStream - The drift files zip file streamExceptionvoid deleteResourceDriftDefinition(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int driftDefId)
void detectDrift(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
org.rhq.core.domain.drift.DriftDefinition driftDef)
entityContext - driftDef - RuntimeExceptionorg.rhq.core.domain.util.PageList<org.rhq.core.domain.drift.DriftComposite> findDriftCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.DriftCriteria criteria)
org.rhq.core.domain.util.PageList<org.rhq.core.domain.drift.DriftDefinitionComposite> findDriftDefinitionCompositesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.DriftDefinitionCriteria criteria)
org.rhq.core.domain.drift.DriftDefinition getDriftDefinition(org.rhq.core.domain.auth.Subject subject,
int driftDefId)
driftDefId - RuntimeException, - IllegalArgumentException if entity or driftDef not found.org.rhq.core.domain.drift.DriftDetails getDriftDetails(org.rhq.core.domain.auth.Subject subject,
String driftId)
subject - driftId - org.rhq.core.domain.drift.DriftFile getDriftFile(org.rhq.core.domain.auth.Subject subject,
String hashId)
throws Exception
ExceptionString getDriftFileBits(org.rhq.core.domain.auth.Subject subject, String hash)
getDriftFileBits in interface DriftManagerRemotehash - The hash the uniquely identifies the requested contentboolean isBinaryFile(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.drift.Drift<?,?> drift)
String persistSnapshot(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.drift.DriftSnapshot snapshot, org.rhq.core.domain.drift.DriftChangeSet<? extends org.rhq.core.domain.drift.Drift<?,?>> changeSet)
void processRepeatChangeSet(int resourceId,
String driftDefName,
int version)
void purgeByDriftDefinitionName(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String driftDefName)
throws Exception
Subject - resourceId - the resource whose drift definition is being purgeddriftDefName - identifies the data that is to be purgedExceptionvoid saveChangeSetContent(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String driftDefName,
String token,
File changeSetFilesZip)
throws Exception
ExceptionDriftChangeSetSummary saveChangeSet(org.rhq.core.domain.auth.Subject subject, int resourceId, File changeSetZip) throws Exception
Exceptionvoid saveChangeSetFiles(org.rhq.core.domain.auth.Subject subject,
File changeSetFilesZip)
throws Exception
Exceptionvoid updateDriftDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.drift.DriftDefinition driftDefinition)
void updateDriftDefinition(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext entityContext,
org.rhq.core.domain.drift.DriftDefinition driftDef)
Saves or updates the provided drift definition. If the definition, identified by name, already exists, an update is performed; otherwise, a new drift definition is saved. Agents if available will be notified of the change. If agents are unreachable, the definition will still be saved/updated. Changes will then propagate to agents the next time they do an inventory sync.
Several validation checks are performed before the definition is persisted. If it is a new definition, the following checks are performed:
updateDriftDefinition in interface DriftManagerRemotesubject - entityContext - driftDef - int purgeOrphanedDriftFiles(org.rhq.core.domain.auth.Subject subject,
long purgeMillis)
subject - purgeMillis - only those unused drift files that are older than this (in epoch millis) will be purged.Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.