org.rhq.enterprise.server.plugins.drift.mongodb
Class MongoDBDriftServer
java.lang.Object
org.rhq.enterprise.server.plugins.drift.mongodb.MongoDBDriftServer
- All Implemented Interfaces:
- DriftServerPluginFacet, ServerPluginComponent
public class MongoDBDriftServer
- extends Object
- implements DriftServerPluginFacet, ServerPluginComponent
|
Method Summary |
String |
copyChangeSet(Subject subject,
String changeSetId,
int driftDefId,
int resourceId)
|
PageList<? extends DriftChangeSet<?>> |
findDriftChangeSetsByCriteria(Subject subject,
DriftChangeSetCriteria criteria)
|
PageList<DriftComposite> |
findDriftCompositesByCriteria(Subject subject,
DriftCriteria criteria)
|
PageList<? extends Drift<?,?>> |
findDriftsByCriteria(Subject subject,
DriftCriteria criteria)
|
ChangeSetDAO |
getChangeSetDAO()
|
com.mongodb.Mongo |
getConnection()
|
com.google.code.morphia.Datastore |
getDatastore()
|
protected org.rhq.core.clientapi.agent.drift.DriftAgentService |
getDriftAgentService(int resourceId)
|
protected DriftDefinition |
getDriftDef(Subject subject,
int id)
|
DriftFile |
getDriftFile(Subject subject,
String hashId)
|
byte[] |
getDriftFileAsByteArray(Subject subject,
String hash)
|
String |
getDriftFileBits(Subject subject,
String hash)
|
FileDAO |
getFileDAO()
|
com.google.code.morphia.Morphia |
getMorphia()
|
void |
initialize(ServerPluginContext context)
|
String |
persistChangeSet(Subject subject,
DriftChangeSet<?> changeSet)
|
void |
purgeByDriftDefinitionName(Subject subject,
int resourceId,
String driftDefName)
|
void |
purgeOrphanedContent()
|
int |
purgeOrphanedDriftFiles(Subject subject,
long purgeMillis)
|
DriftChangeSetSummary |
saveChangeSet(Subject subject,
int resourceId,
File changeSetZip)
|
void |
saveChangeSetFiles(Subject subject,
File changeSetFilesZip)
|
void |
setChangeSetDAO(ChangeSetDAO changeSetDAO)
|
void |
setConnection(com.mongodb.Mongo connection)
|
void |
setDatastore(com.google.code.morphia.Datastore ds)
|
void |
setFileDAO(FileDAO fileDAO)
|
void |
setMorphia(com.google.code.morphia.Morphia morphia)
|
void |
shutdown()
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MongoDBDriftServer
public MongoDBDriftServer()
getConnection
public com.mongodb.Mongo getConnection()
setConnection
public void setConnection(com.mongodb.Mongo connection)
getMorphia
public com.google.code.morphia.Morphia getMorphia()
setMorphia
public void setMorphia(com.google.code.morphia.Morphia morphia)
getDatastore
public com.google.code.morphia.Datastore getDatastore()
setDatastore
public void setDatastore(com.google.code.morphia.Datastore ds)
getChangeSetDAO
public ChangeSetDAO getChangeSetDAO()
setChangeSetDAO
public void setChangeSetDAO(ChangeSetDAO changeSetDAO)
getFileDAO
public FileDAO getFileDAO()
setFileDAO
public void setFileDAO(FileDAO fileDAO)
initialize
public void initialize(ServerPluginContext context)
throws Exception
- Specified by:
initialize in interface ServerPluginComponent
- Throws:
Exception
start
public void start()
- Specified by:
start in interface ServerPluginComponent
stop
public void stop()
- Specified by:
stop in interface ServerPluginComponent
shutdown
public void shutdown()
- Specified by:
shutdown in interface ServerPluginComponent
saveChangeSet
public DriftChangeSetSummary saveChangeSet(Subject subject,
int resourceId,
File changeSetZip)
throws Exception
- Specified by:
saveChangeSet in interface DriftServerPluginFacet
- Throws:
Exception
getDriftAgentService
protected org.rhq.core.clientapi.agent.drift.DriftAgentService getDriftAgentService(int resourceId)
saveChangeSetFiles
public void saveChangeSetFiles(Subject subject,
File changeSetFilesZip)
throws Exception
- Specified by:
saveChangeSetFiles in interface DriftServerPluginFacet
- Throws:
Exception
findDriftChangeSetsByCriteria
public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,
DriftChangeSetCriteria criteria)
- Specified by:
findDriftChangeSetsByCriteria in interface DriftServerPluginFacet
findDriftsByCriteria
public PageList<? extends Drift<?,?>> findDriftsByCriteria(Subject subject,
DriftCriteria criteria)
- Specified by:
findDriftsByCriteria in interface DriftServerPluginFacet
findDriftCompositesByCriteria
public PageList<DriftComposite> findDriftCompositesByCriteria(Subject subject,
DriftCriteria criteria)
- Specified by:
findDriftCompositesByCriteria in interface DriftServerPluginFacet
getDriftFile
public DriftFile getDriftFile(Subject subject,
String hashId)
throws Exception
- Specified by:
getDriftFile in interface DriftServerPluginFacet
- Throws:
Exception
purgeByDriftDefinitionName
public void purgeByDriftDefinitionName(Subject subject,
int resourceId,
String driftDefName)
throws Exception
- Specified by:
purgeByDriftDefinitionName in interface DriftServerPluginFacet
- Throws:
Exception
purgeOrphanedDriftFiles
public int purgeOrphanedDriftFiles(Subject subject,
long purgeMillis)
- Specified by:
purgeOrphanedDriftFiles in interface DriftServerPluginFacet
purgeOrphanedContent
public void purgeOrphanedContent()
getDriftFileBits
public String getDriftFileBits(Subject subject,
String hash)
- Specified by:
getDriftFileBits in interface DriftServerPluginFacet
persistChangeSet
public String persistChangeSet(Subject subject,
DriftChangeSet<?> changeSet)
- Specified by:
persistChangeSet in interface DriftServerPluginFacet
copyChangeSet
public String copyChangeSet(Subject subject,
String changeSetId,
int driftDefId,
int resourceId)
- Specified by:
copyChangeSet in interface DriftServerPluginFacet
getDriftFileAsByteArray
public byte[] getDriftFileAsByteArray(Subject subject,
String hash)
- Specified by:
getDriftFileAsByteArray in interface DriftServerPluginFacet
getDriftDef
protected DriftDefinition getDriftDef(Subject subject,
int id)
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.