public class SynchronizationManagerBean extends Object implements SynchronizationManagerLocal, SynchronizationManagerRemote
| Constructor and Description |
|---|
SynchronizationManagerBean() |
| Modifier and Type | Method and Description |
|---|---|
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) |
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 userSynchronizationManagerRemote#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 permissionpublic 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 SynchronizationManagerLocalValidationExceptionImportExceptionpublic 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
SynchronizationManagerRemoteimportAllSubsystems 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.ValidationExceptionImportExceptionSynchronizationManagerRemote#importAllSubsystems(Subject, byte[], Set)public void validate(org.rhq.core.domain.auth.Subject subject,
InputStream exportFile)
throws ValidationException
validate in interface SynchronizationManagerLocalValidationExceptionpublic 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)
SynchronizationManagerRemotegetImportConfigurationDefinition in interface SynchronizationManagerLocalgetImportConfigurationDefinition in interface SynchronizationManagerRemoteSynchronizationManagerRemote.getImportConfigurationDefinition(String)public List<org.rhq.core.domain.sync.ImportConfigurationDefinition> getImportConfigurationDefinitionOfAllSynchronizers()
SynchronizationManagerRemotegetImportConfigurationDefinitionOfAllSynchronizers in interface SynchronizationManagerLocalgetImportConfigurationDefinitionOfAllSynchronizers in interface SynchronizationManagerRemoteSynchronizationManagerRemote.getImportConfigurationDefinitionOfAllSynchronizers()Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.