Package org.bedework.synch.service
Class SynchConf
- java.lang.Object
-
- org.bedework.util.jmx.ConfBase<SynchConfig>
-
- org.bedework.synch.service.SynchConf
-
- All Implemented Interfaces:
SynchConfMBean,org.bedework.util.jmx.BaseMBean,org.bedework.util.jmx.ConfBaseMBean,org.bedework.util.jmx.ConfigHolder<SynchConfig>,org.bedework.util.logging.Logged
public class SynchConf extends org.bedework.util.jmx.ConfBase<SynchConfig> implements SynchConfMBean, org.bedework.util.jmx.ConfigHolder<SynchConfig>
- Author:
- douglm
-
-
Constructor Summary
Constructors Constructor Description SynchConf()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHibernateProperty(String name, String value)StringdisplayHibernateProperty(String name)Display the named propertyStringgetCallbackURI()web service push callback uri - null for no serviceSynchConfiggetConfig()List<String>getConnectorNames()List connector namesintgetDumpThreshold()booleangetExport()StringgetHibernateDialect()StringgetKeystore()Path to keystore - null for use defaultintgetMissingTargetRetries()StringgetPrivKeys()StringgetPubKeys()StringgetSchemaOutFile()List<Stat>getStats()Get the current statsbooleangetSubscriptionsOnly()intgetSynchlingPoolSize()longgetSynchlingPoolTimeout()StringgetTimezonesURI()Timezone server locationbooleanisStarted()LifecycleStringlistHibernateProperties()List the hibernate propertiesStringloadConfig()(Re)load the configurationvoidputConfig()Save the configuration.voidremoveHibernateProperty(String name)Remove the named propertyStringrescheduleNow(String id)Reschedule the subscription nowStringschema()Create or dump new schema.List<String>schemaStatus()Returns status of the schema build.voidsetCallbackURI(String val)web service push callback uri - null for no servicevoidsetDumpThreshold(int val)voidsetExport(boolean val)voidsetHibernateDialect(String value)voidsetHibernateProperty(String name, String value)voidsetKeystore(String val)Path to keystore - null for use defaultvoidsetMissingTargetRetries(int val)How often we retry when a target is missingvoidsetPrivKeys(String val)voidsetPubKeys(String val)voidsetSchemaOutFile(String val)voidsetSubscriptionsOnly(boolean val)voidsetSynchlingPoolSize(int val)voidsetSynchlingPoolTimeout(long val)voidsetTimezonesURI(String val)Timezone server locationvoidstart()Lifecyclevoidstop()Lifecycle-
Methods inherited from class org.bedework.util.jmx.ConfBase
createObjectName, getConfigInfo, getConfigInfo, getConfigInfo, getConfigName, getConfigPname, getConfigUri, getLogger, getManagementContext, getPathSuffix, getRegisteredMBeans, getServiceName, getServiceObjectName, getStatus, getStore, isRunning, loadConfig, loadOnlyConfig, makeObject, register, register, saveConfig, setConfigName, setConfigPname, setConfigUri, setPathSuffix, setServiceName, setStatus, setStore, unregister, unregister
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.jmx.ConfBaseMBean
getConfigName, getStatus, saveConfig, setConfigName, setStatus
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
-
-
-
Method Detail
-
setExport
public void setExport(boolean val)
- Specified by:
setExportin interfaceSynchConfMBean- Parameters:
val- Export schema to database?
-
getExport
public boolean getExport()
- Specified by:
getExportin interfaceSynchConfMBean- Returns:
- true for export schema
-
setSchemaOutFile
public void setSchemaOutFile(String val)
- Specified by:
setSchemaOutFilein interfaceSynchConfMBean- Parameters:
val- Output file name - full path
-
getSchemaOutFile
public String getSchemaOutFile()
- Specified by:
getSchemaOutFilein interfaceSynchConfMBean- Returns:
- Output file name - full path
-
setDumpThreshold
public void setDumpThreshold(int val)
- Specified by:
setDumpThresholdin interfaceSynchConfMBean- Parameters:
val- Dump threshold
-
getDumpThreshold
public int getDumpThreshold()
- Specified by:
getDumpThresholdin interfaceSynchConfMBean- Returns:
- Dump threshold
-
setSynchlingPoolSize
public void setSynchlingPoolSize(int val)
- Specified by:
setSynchlingPoolSizein interfaceSynchConfMBean- Parameters:
val- current size of synchling pool
-
getSynchlingPoolSize
public int getSynchlingPoolSize()
- Specified by:
getSynchlingPoolSizein interfaceSynchConfMBean- Returns:
- current size of synchling pool
-
setSynchlingPoolTimeout
public void setSynchlingPoolTimeout(long val)
- Specified by:
setSynchlingPoolTimeoutin interfaceSynchConfMBean- Parameters:
val- timeout in millisecs
-
getSynchlingPoolTimeout
public long getSynchlingPoolTimeout()
- Specified by:
getSynchlingPoolTimeoutin interfaceSynchConfMBean- Returns:
- timeout in millisecs
-
setMissingTargetRetries
public void setMissingTargetRetries(int val)
Description copied from interface:SynchConfMBeanHow often we retry when a target is missing- Specified by:
setMissingTargetRetriesin interfaceSynchConfMBean
-
getMissingTargetRetries
public int getMissingTargetRetries()
- Specified by:
getMissingTargetRetriesin interfaceSynchConfMBean- Returns:
- How often we retry when a target is missing
-
setCallbackURI
public void setCallbackURI(String val)
Description copied from interface:SynchConfMBeanweb service push callback uri - null for no service- Specified by:
setCallbackURIin interfaceSynchConfMBean- Parameters:
val- String
-
getCallbackURI
public String getCallbackURI()
web service push callback uri - null for no service- Specified by:
getCallbackURIin interfaceSynchConfMBean- Returns:
- String
-
setTimezonesURI
public void setTimezonesURI(String val)
Timezone server location- Specified by:
setTimezonesURIin interfaceSynchConfMBean- Parameters:
val- String
-
getTimezonesURI
public String getTimezonesURI()
Timezone server location- Specified by:
getTimezonesURIin interfaceSynchConfMBean- Returns:
- String
-
setKeystore
public void setKeystore(String val)
Path to keystore - null for use default- Specified by:
setKeystorein interfaceSynchConfMBean- Parameters:
val- String
-
getKeystore
public String getKeystore()
Path to keystore - null for use default- Specified by:
getKeystorein interfaceSynchConfMBean- Returns:
- String
-
setPrivKeys
public void setPrivKeys(String val)
- Specified by:
setPrivKeysin interfaceSynchConfMBean- Parameters:
val- String
-
getPrivKeys
public String getPrivKeys()
- Specified by:
getPrivKeysin interfaceSynchConfMBean- Returns:
- String
-
setPubKeys
public void setPubKeys(String val)
- Specified by:
setPubKeysin interfaceSynchConfMBean- Parameters:
val- String
-
getPubKeys
public String getPubKeys()
- Specified by:
getPubKeysin interfaceSynchConfMBean- Returns:
- String
-
getConnectorNames
public List<String> getConnectorNames()
Description copied from interface:SynchConfMBeanList connector names- Specified by:
getConnectorNamesin interfaceSynchConfMBean- Returns:
- list of names
-
setSubscriptionsOnly
public void setSubscriptionsOnly(boolean val)
- Specified by:
setSubscriptionsOnlyin interfaceSynchConfMBean- Parameters:
val- true if this instance only handles subscriptions
-
getSubscriptionsOnly
public boolean getSubscriptionsOnly()
- Specified by:
getSubscriptionsOnlyin interfaceSynchConfMBean- Returns:
- true if this instance only handles subscriptions
-
getStats
public List<Stat> getStats()
Description copied from interface:SynchConfMBeanGet the current stats- Specified by:
getStatsin interfaceSynchConfMBean- Returns:
- List of Stat
-
schema
public String schema()
Description copied from interface:SynchConfMBeanCreate or dump new schema. If export and drop set will try to drop tables. Export and create will create a schema in the db and export, drop, create will drop tables, and try to create a new schema. The export and drop flags will all be reset to false after this, whatever the result. This avoids accidental damage to the db.- Specified by:
schemain interfaceSynchConfMBean- Returns:
- Completion message
-
schemaStatus
public List<String> schemaStatus()
Description copied from interface:SynchConfMBeanReturns status of the schema build.- Specified by:
schemaStatusin interfaceSynchConfMBean- Returns:
- Completion messages
-
rescheduleNow
public String rescheduleNow(String id)
Description copied from interface:SynchConfMBeanReschedule the subscription now- Specified by:
rescheduleNowin interfaceSynchConfMBean- Returns:
- status
-
setHibernateDialect
public void setHibernateDialect(String value)
- Specified by:
setHibernateDialectin interfaceSynchConfMBean
-
getHibernateDialect
public String getHibernateDialect()
- Specified by:
getHibernateDialectin interfaceSynchConfMBean- Returns:
- Completion messages
-
listHibernateProperties
public String listHibernateProperties()
Description copied from interface:SynchConfMBeanList the hibernate properties- Specified by:
listHibernatePropertiesin interfaceSynchConfMBean- Returns:
- properties
-
displayHibernateProperty
public String displayHibernateProperty(String name)
Description copied from interface:SynchConfMBeanDisplay the named property- Specified by:
displayHibernatePropertyin interfaceSynchConfMBean- Returns:
- value
-
removeHibernateProperty
public void removeHibernateProperty(String name)
Description copied from interface:SynchConfMBeanRemove the named property- Specified by:
removeHibernatePropertyin interfaceSynchConfMBean
-
addHibernateProperty
public void addHibernateProperty(String name, String value)
- Specified by:
addHibernatePropertyin interfaceSynchConfMBean
-
setHibernateProperty
public void setHibernateProperty(String name, String value)
- Specified by:
setHibernatePropertyin interfaceSynchConfMBean
-
start
public void start()
Description copied from interface:SynchConfMBeanLifecycle- Specified by:
startin interfaceorg.bedework.util.jmx.BaseMBean- Specified by:
startin interfaceSynchConfMBean- Overrides:
startin classorg.bedework.util.jmx.ConfBase<SynchConfig>
-
stop
public void stop()
Description copied from interface:SynchConfMBeanLifecycle- Specified by:
stopin interfaceorg.bedework.util.jmx.BaseMBean- Specified by:
stopin interfaceSynchConfMBean- Overrides:
stopin classorg.bedework.util.jmx.ConfBase<SynchConfig>
-
isStarted
public boolean isStarted()
Description copied from interface:SynchConfMBeanLifecycle- Specified by:
isStartedin interfaceSynchConfMBean- Returns:
- true if started
-
loadConfig
public String loadConfig()
Description copied from interface:SynchConfMBean(Re)load the configuration- Specified by:
loadConfigin interfaceSynchConfMBean- Specified by:
loadConfigin classorg.bedework.util.jmx.ConfBase<SynchConfig>- Returns:
- status
-
getConfig
public SynchConfig getConfig()
- Specified by:
getConfigin interfaceorg.bedework.util.jmx.ConfigHolder<SynchConfig>- Overrides:
getConfigin classorg.bedework.util.jmx.ConfBase<SynchConfig>
-
putConfig
public void putConfig()
Save the configuration.- Specified by:
putConfigin interfaceorg.bedework.util.jmx.ConfigHolder<SynchConfig>
-
-