|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.sync.SynchronizationManagerBean
public class SynchronizationManagerBean
| Constructor Summary | |
|---|---|
SynchronizationManagerBean()
|
|
| Method Summary | |
|---|---|
org.rhq.core.domain.sync.ExportReport |
exportAllSubsystems(org.rhq.core.domain.auth.Subject subject)
Don't use this method if you access it from the same JVM. |
org.rhq.core.domain.sync.ExportWrapper |
exportAllSubsystemsLocally(org.rhq.core.domain.auth.Subject subject)
This method returns an export wrapper that contains the structure to contain the future messages from the export process and an input stream that is going to create the export (and fill in the messages) while it is being read. |
org.rhq.core.domain.sync.ImportConfigurationDefinition |
getImportConfigurationDefinition(String synchronizerClass)
Returns the configuration definition of the import for synchronizer of given type. |
List<org.rhq.core.domain.sync.ImportConfigurationDefinition> |
getImportConfigurationDefinitionOfAllSynchronizers()
Returns the configuration definitions of all known importers. |
org.rhq.core.domain.sync.ImportReport |
importAllSubsystems(org.rhq.core.domain.auth.Subject subject,
byte[] exportFile,
List<org.rhq.core.domain.sync.ImportConfiguration> configurations)
Imports everything from the export file. |
org.rhq.core.domain.sync.ImportReport |
importAllSubsystems(org.rhq.core.domain.auth.Subject subject,
InputStream exportFile,
List<org.rhq.core.domain.sync.ImportConfiguration> configurations)
|
void |
setSynchronizerFactory(SynchronizerFactory factory)
Provided for testability reasons. |
void |
validate(org.rhq.core.domain.auth.Subject subject,
byte[] exportFile)
|
void |
validate(org.rhq.core.domain.auth.Subject subject,
InputStream exportFile)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SynchronizationManagerBean()
| Method Detail |
|---|
public void setSynchronizerFactory(SynchronizerFactory factory)
SynchronizationManagerLocal
Using this method one can provide a custom factory
for Synchronizers. This way one can export/import different types of entities
than by default.
setSynchronizerFactory in interface SynchronizationManagerLocalpublic org.rhq.core.domain.sync.ExportReport exportAllSubsystems(org.rhq.core.domain.auth.Subject subject)
SynchronizationManagerLocal#exportAllSubsystemsLocally() is more memory efficient.
This method executes the export of all subsystems and serializes the data into an byte array.
exportAllSubsystems in interface SynchronizationManagerLocalexportAllSubsystems in interface SynchronizationManagerRemotesubject - the logged in user
SynchronizationManagerRemote#exportAllSubsystems()public org.rhq.core.domain.sync.ExportWrapper exportAllSubsystemsLocally(org.rhq.core.domain.auth.Subject subject)
SynchronizationManagerLocalThis minimizes the memory needed to hold the export data to just 64K (the size of the buffer to hold the data). The memory consumption will of course be also determined by the amount of data being read from the database but the point is that not all the data will be held in memory (because the exporters for various subsystems will be called in sequence) and that the data doesn't have to reside in the memory in two forms - the internal datastructures AND the serialized form of the export file that it is going to be transfered as.
exportAllSubsystemsLocally in interface SynchronizationManagerLocalsubject - the logged in user that has Permission.MANAGE_INVENTORY permission
public org.rhq.core.domain.sync.ImportReport importAllSubsystems(org.rhq.core.domain.auth.Subject subject,
InputStream exportFile,
List<org.rhq.core.domain.sync.ImportConfiguration> configurations)
throws ValidationException,
ImportException
importAllSubsystems in interface SynchronizationManagerLocalValidationException
ImportException
public org.rhq.core.domain.sync.ImportReport importAllSubsystems(org.rhq.core.domain.auth.Subject subject,
byte[] exportFile,
List<org.rhq.core.domain.sync.ImportConfiguration> configurations)
throws ValidationException,
ImportException
SynchronizationManagerRemote
importAllSubsystems in interface SynchronizationManagerLocalimportAllSubsystems in interface SynchronizationManagerRemotesubject - the authenticated userexportFile - the contents of the export fileconfigurations - the configurations of individual importers to be used when importing or null
if the default configurations should be used for all the importers.
ValidationException
ImportExceptionSynchronizationManagerRemote#importAllSubsystems(Subject, byte[], Set)
public void validate(org.rhq.core.domain.auth.Subject subject,
InputStream exportFile)
throws ValidationException
validate in interface SynchronizationManagerLocalValidationException
public void validate(org.rhq.core.domain.auth.Subject subject,
byte[] exportFile)
throws ValidationException
validate in interface SynchronizationManagerLocalvalidate in interface SynchronizationManagerRemoteValidationExceptionSynchronizationManagerRemote.validate(Subject, byte[])public org.rhq.core.domain.sync.ImportConfigurationDefinition getImportConfigurationDefinition(String synchronizerClass)
SynchronizationManagerRemote
getImportConfigurationDefinition in interface SynchronizationManagerLocalgetImportConfigurationDefinition in interface SynchronizationManagerRemoteSynchronizationManagerRemote.getImportConfigurationDefinition(String)public List<org.rhq.core.domain.sync.ImportConfigurationDefinition> getImportConfigurationDefinitionOfAllSynchronizers()
SynchronizationManagerRemote
getImportConfigurationDefinitionOfAllSynchronizers in interface SynchronizationManagerLocalgetImportConfigurationDefinitionOfAllSynchronizers in interface SynchronizationManagerRemoteSynchronizationManagerRemote.getImportConfigurationDefinitionOfAllSynchronizers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||