Class AbstractDestinationDescriptor
- java.lang.Object
-
- net.timewalker.ffmq4.utils.descriptor.AbstractDescriptor
-
- net.timewalker.ffmq4.utils.descriptor.AbstractSettingsBasedDescriptor
-
- net.timewalker.ffmq4.management.destination.AbstractDestinationDescriptor
-
- All Implemented Interfaces:
DestinationDescriptorMBean,Checkable
- Direct Known Subclasses:
AbstractDestinationDefinition,AbstractDestinationTemplate
public abstract class AbstractDestinationDescriptor extends AbstractSettingsBasedDescriptor implements DestinationDescriptorMBean
Base implementation for a destination descriptor.
-
-
Field Summary
Fields Modifier and Type Field Description protected intautoExtendAmountprotected intblockSizeprotected FiledataFolderprotected intinitialBlockCountprotected FilejournalFolderprotected intjournalOutputBufferprotected intmaxBlockCountprotected longmaxJournalSizeprotected intmaxNonPersistentMessagesprotected intmaxUncommittedStoreSizeprotected intmaxUnflushedJournalSizeprotected intmaxWriteBatchSizeprotected Stringnameprotected booleanoverflowToPersistentprotected booleanpreAllocateFilesprotected StringrawDataFolderprotected StringrawJournalFolderprotected intstorageSyncMethodprotected booleantemporaryprotected booleanuseJournal
-
Constructor Summary
Constructors Constructor Description AbstractDestinationDescriptor()ConstructorAbstractDestinationDescriptor(Settings settings)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SettingsasSettings()Serialize the definition to settingsvoidcheck()Check the object consistencyprotected voidcopyAttributesTo(AbstractDestinationDefinition target)protected voidfillSettings(Settings settings)Append nodes to the XML definitionintgetAutoExtendAmount()intgetBlockSize()FilegetDataFolder()intgetInitialBlockCount()FilegetJournalFolder()intgetJournalOutputBuffer()intgetMaxBlockCount()longgetMaxJournalSize()intgetMaxNonPersistentMessages()intgetMaxUncommittedStoreSize()intgetMaxUnflushedJournalSize()intgetMaxWriteBatchSize()StringgetName()Get the destination nameStringgetRawDataFolder()StringgetRawJournalFolder()intgetStorageSyncMethod()booleanhasPersistentStore()protected voidinitFromSettings(Settings settings)Initialize descriptor fields from the given settingsbooleanisOverflowToPersistent()booleanisPreAllocateFiles()booleanisTemporary()booleanisUseJournal()voidsetAutoExtendAmount(int autoExtendAmount)voidsetBlockSize(int blockSize)voidsetDataFolder(File dataFolder)voidsetInitialBlockCount(int initialBlockCount)voidsetJournalFolder(File journalFolder)voidsetJournalOutputBuffer(int journalOutputBuffer)voidsetMaxBlockCount(int maxBlockCount)voidsetMaxJournalSize(long maxJournalSize)voidsetMaxNonPersistentMessages(int maxNonPersistentMessages)voidsetMaxUncommittedStoreSize(int maxUncommittedStoreSize)voidsetMaxUnflushedJournalSize(int maxUnflushedJournalSize)voidsetMaxWriteBatchSize(int maxWriteBatchSize)voidsetName(String name)voidsetOverflowToPersistent(boolean overflowToPersistent)voidsetPreAllocateFiles(boolean preAllocateFiles)voidsetRawDataFolder(String rawDataFolder)voidsetRawJournalFolder(String rawJournalFolder)voidsetStorageSyncMethod(int storageSyncMethod)voidsetTemporary(boolean temporary)voidsetUseJournal(boolean useJournal)StringtoString()-
Methods inherited from class net.timewalker.ffmq4.utils.descriptor.AbstractDescriptor
getDescriptorFile, setDescriptorFile
-
-
-
-
Field Detail
-
name
protected String name
-
initialBlockCount
protected int initialBlockCount
-
maxBlockCount
protected int maxBlockCount
-
autoExtendAmount
protected int autoExtendAmount
-
blockSize
protected int blockSize
-
rawDataFolder
protected String rawDataFolder
-
dataFolder
protected File dataFolder
-
maxNonPersistentMessages
protected int maxNonPersistentMessages
-
useJournal
protected boolean useJournal
-
rawJournalFolder
protected String rawJournalFolder
-
journalFolder
protected File journalFolder
-
maxJournalSize
protected long maxJournalSize
-
maxWriteBatchSize
protected int maxWriteBatchSize
-
maxUnflushedJournalSize
protected int maxUnflushedJournalSize
-
maxUncommittedStoreSize
protected int maxUncommittedStoreSize
-
journalOutputBuffer
protected int journalOutputBuffer
-
temporary
protected boolean temporary
-
storageSyncMethod
protected int storageSyncMethod
-
preAllocateFiles
protected boolean preAllocateFiles
-
overflowToPersistent
protected boolean overflowToPersistent
-
-
Constructor Detail
-
AbstractDestinationDescriptor
public AbstractDestinationDescriptor()
Constructor
-
AbstractDestinationDescriptor
public AbstractDestinationDescriptor(Settings settings)
Constructor
-
-
Method Detail
-
initFromSettings
protected void initFromSettings(Settings settings)
Description copied from class:AbstractSettingsBasedDescriptorInitialize descriptor fields from the given settings- Specified by:
initFromSettingsin classAbstractSettingsBasedDescriptor- Parameters:
settings- some settings
-
copyAttributesTo
protected void copyAttributesTo(AbstractDestinationDefinition target)
-
asSettings
public final Settings asSettings()
Serialize the definition to settings
-
fillSettings
protected void fillSettings(Settings settings)
Append nodes to the XML definition
-
getName
public String getName()
Description copied from interface:DestinationDescriptorMBeanGet the destination name- Specified by:
getNamein interfaceDestinationDescriptorMBean
-
isTemporary
public boolean isTemporary()
- Specified by:
isTemporaryin interfaceDestinationDescriptorMBean
-
getDataFolder
public File getDataFolder()
-
getMaxNonPersistentMessages
public int getMaxNonPersistentMessages()
- Specified by:
getMaxNonPersistentMessagesin interfaceDestinationDescriptorMBean
-
isUseJournal
public boolean isUseJournal()
- Specified by:
isUseJournalin interfaceDestinationDescriptorMBean- Returns:
- useJournal
-
getInitialBlockCount
public int getInitialBlockCount()
- Specified by:
getInitialBlockCountin interfaceDestinationDescriptorMBean
-
getBlockSize
public int getBlockSize()
- Specified by:
getBlockSizein interfaceDestinationDescriptorMBean
-
setInitialBlockCount
public void setInitialBlockCount(int initialBlockCount)
- Parameters:
initialBlockCount- the initial blockCount to set
-
setMaxBlockCount
public void setMaxBlockCount(int maxBlockCount)
- Parameters:
maxBlockCount- the maxBlockCount to set
-
getMaxBlockCount
public int getMaxBlockCount()
- Specified by:
getMaxBlockCountin interfaceDestinationDescriptorMBean- Returns:
- the maxBlockCount
-
setAutoExtendAmount
public void setAutoExtendAmount(int autoExtendAmount)
- Parameters:
autoExtendAmount- the autoExtendAmount to set
-
getAutoExtendAmount
public int getAutoExtendAmount()
- Specified by:
getAutoExtendAmountin interfaceDestinationDescriptorMBean- Returns:
- the autoExtendAmount
-
setBlockSize
public void setBlockSize(int blockSize)
- Parameters:
blockSize- the blockSize to set
-
getRawDataFolder
public String getRawDataFolder()
- Returns:
- the rawDataFolder
-
setRawDataFolder
public void setRawDataFolder(String rawDataFolder)
- Parameters:
rawDataFolder- the rawDataFolder to set
-
setDataFolder
public void setDataFolder(File dataFolder)
- Parameters:
dataFolder- the dataFolder to set
-
setUseJournal
public void setUseJournal(boolean useJournal)
- Parameters:
useJournal- the useJournal to set
-
setName
public void setName(String name)
- Parameters:
name- the name to set
-
setMaxNonPersistentMessages
public void setMaxNonPersistentMessages(int maxNonPersistentMessages)
- Parameters:
maxNonPersistentMessages- the maxNonPersistentMessages to set
-
setTemporary
public void setTemporary(boolean temporary)
- Parameters:
temporary- the temporary to set
-
getRawJournalFolder
public String getRawJournalFolder()
- Returns:
- the rawJournalFolder
-
setRawJournalFolder
public void setRawJournalFolder(String rawJournalFolder)
- Parameters:
rawJournalFolder- the rawJournalFolder to set
-
getJournalFolder
public File getJournalFolder()
- Returns:
- the journalFolder
-
setJournalFolder
public void setJournalFolder(File journalFolder)
- Parameters:
journalFolder- the journalFolder to set
-
getMaxJournalSize
public long getMaxJournalSize()
- Specified by:
getMaxJournalSizein interfaceDestinationDescriptorMBean- Returns:
- the maxJournalSize
-
setMaxJournalSize
public void setMaxJournalSize(long maxJournalSize)
- Parameters:
maxJournalSize- the maxJournalSize to set
-
getMaxWriteBatchSize
public int getMaxWriteBatchSize()
- Specified by:
getMaxWriteBatchSizein interfaceDestinationDescriptorMBean- Returns:
- the maxWriteBatchSize
-
setMaxWriteBatchSize
public void setMaxWriteBatchSize(int maxWriteBatchSize)
- Parameters:
maxWriteBatchSize- the maxWriteBatchSize to set
-
getMaxUnflushedJournalSize
public int getMaxUnflushedJournalSize()
- Specified by:
getMaxUnflushedJournalSizein interfaceDestinationDescriptorMBean- Returns:
- the maxUnflushedJournalSize
-
setMaxUnflushedJournalSize
public void setMaxUnflushedJournalSize(int maxUnflushedJournalSize)
- Parameters:
maxUnflushedJournalSize- the maxUnflushedJournalSize to set
-
getMaxUncommittedStoreSize
public int getMaxUncommittedStoreSize()
- Specified by:
getMaxUncommittedStoreSizein interfaceDestinationDescriptorMBean- Returns:
- the maxUncommittedStoreSize
-
setMaxUncommittedStoreSize
public void setMaxUncommittedStoreSize(int maxUncommittedStoreSize)
- Parameters:
maxUncommittedStoreSize- the maxUncommittedStoreSize to set
-
getJournalOutputBuffer
public int getJournalOutputBuffer()
- Specified by:
getJournalOutputBufferin interfaceDestinationDescriptorMBean- Returns:
- the journalOutputBuffer
-
setJournalOutputBuffer
public void setJournalOutputBuffer(int journalOutputBuffer)
- Parameters:
journalOutputBuffer- the journalOutputBuffer to set
-
getStorageSyncMethod
public int getStorageSyncMethod()
- Specified by:
getStorageSyncMethodin interfaceDestinationDescriptorMBean- Returns:
- the storageSyncMethod
-
setStorageSyncMethod
public void setStorageSyncMethod(int storageSyncMethod)
- Parameters:
storageSyncMethod- the syncMethod to set
-
isPreAllocateFiles
public boolean isPreAllocateFiles()
- Specified by:
isPreAllocateFilesin interfaceDestinationDescriptorMBean- Returns:
- the preAllocateFiles
-
setPreAllocateFiles
public void setPreAllocateFiles(boolean preAllocateFiles)
- Parameters:
preAllocateFiles- the preAllocateFiles to set
-
isOverflowToPersistent
public boolean isOverflowToPersistent()
- Returns:
- the overflowToPersistent
-
setOverflowToPersistent
public void setOverflowToPersistent(boolean overflowToPersistent)
- Parameters:
overflowToPersistent- the overflowToPersistent to set
-
check
public void check() throws javax.jms.JMSExceptionDescription copied from interface:CheckableCheck the object consistency
-
hasPersistentStore
public boolean hasPersistentStore()
-
-