|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager
public class MediationPersistenceManager
Manages all persistence activities related to mediation configuration. Takes care of saving configurations to the file system, registry and updating such configurations as and when necessary. All the mediation components (proxy services, sequences etc) should use this implementation to handle their persistence requirements. This class does not immediately carry out persistence requests. Requests are first queued up and then executed as batch jobs. Therefore admin services which initiate persistence requests does not have to 'wait' for disk and network I/O often associated with persistence activities. This improves the UI response times and system usability in a great deal.
| Constructor Summary | |
|---|---|
MediationPersistenceManager(org.wso2.carbon.registry.core.session.UserRegistry registry,
String configPath,
org.apache.synapse.config.SynapseConfiguration synapseConfiguration,
long interval,
String configName)
Initialize the mediation persistence manager instance and start accepting and processing persistence requests. |
|
| Method Summary | |
|---|---|
void |
deleteItem(String name,
String fileName,
int itemType)
Delete a particular item in the saved mediation configuration. |
void |
deleteItemFromRegistry(String name,
int itemType)
Delete the specified item from the registry only. |
void |
destroy()
|
boolean |
isInitialized()
|
void |
saveFullConfiguration(boolean registryOnly)
Make a request to save the complete mediation configuration (the entire SynapseConfiguration) to be saved to the file system and the registry. |
void |
saveItem(String name,
int itemType)
Save changes made to a particular item of the mediation configuration. |
void |
saveItemToRegistry(String name,
int itemType)
Save the specified item to the registry only. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MediationPersistenceManager(org.wso2.carbon.registry.core.session.UserRegistry registry,
String configPath,
org.apache.synapse.config.SynapseConfiguration synapseConfiguration,
long interval,
String configName)
registry - The UserRegistry instance to be used for persistence or nullconfigPath - Path to the file/directory where configuration should be saved insynapseConfiguration - synapse configuration to be usedinterval - The wait time for the mediation persistence worker threadconfigName - Name of the configuration to be used| Method Detail |
|---|
public void destroy()
public boolean isInitialized()
public void saveItem(String name,
int itemType)
name - Name/ID of the configuration itemitemType - type of the configuration item
public void deleteItem(String name,
String fileName,
int itemType)
name - Name/ID of the configuration itemfileName - Name of the file where the item is currently saved initemType - Type of the configuration item
public void saveItemToRegistry(String name,
int itemType)
name - Name/ID of the configuration itemitemType - Type of the configuration item
public void deleteItemFromRegistry(String name,
int itemType)
name - Name/ID of the configuration itemitemType - Type of the configuration itempublic void saveFullConfiguration(boolean registryOnly)
registryOnly - Whether or not to save the configuration to the registry only
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||