allow journalMaxFileLength config to take xGb or ymb string notation and truncate to int to remain within limits of kahadb page

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@804124 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-08-14 08:28:07 +00:00
parent a5ac040531
commit dbcb7e41a9
4 changed files with 7 additions and 7 deletions

View File

@ -193,19 +193,19 @@ public class KahaDBPersistenceAdapter implements PersistenceAdapter {
* Get the journalMaxFileLength
* @return the journalMaxFileLength
*/
public int getJournalMaxFileLength() {
public long getJournalMaxFileLength() {
return this.letter.getJournalMaxFileLength();
}
/**
* @param journalMaxFileLength
* @param journalMaxFileLength which is rounded to an integer
* When set using XBean, you can use values such as: "20
* mb", "1024 kb", or "1 gb"
*
* @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
*/
public void setJournalMaxFileLength(int journalMaxFileLength) {
this.letter.setJournalMaxFileLength(journalMaxFileLength);
public void setJournalMaxFileLength(long journalMaxFileLength) {
this.letter.setJournalMaxFileLength(Long.valueOf(journalMaxFileLength).intValue());
}
/**

View File

@ -2880,7 +2880,7 @@ false so that messages actually reside long term in the JDBC database.
<xs:attribute name='brokerName' type='xs:string'/>
<xs:attribute name='directory' type='xs:string'/>
<xs:attribute name='indexWriteBatchSize' type='xs:integer'/>
<xs:attribute name='journalMaxFileLength' type='xs:integer'/>
<xs:attribute name='journalMaxFileLength' type='xs:string'/>
<xs:attribute name='enableIndexWriteAsync' type='xs:boolean'/>
<xs:attribute name='enableJournalDiskSyncs' type='xs:boolean'/>
<xs:attribute name='ignoreMissingJournalfiles' type='xs:boolean'/>

View File

@ -972,7 +972,7 @@ false so that messages actually reside long term in the JDBC database.</td></tr>
<tr><th>Attribute</th><th>Type</th><th>Description</th>
<tr><td>brokerName</td><td>xs:string</td><td></td></tr>
<tr><td>directory</td><td>xs:string</td><td></td></tr>
<tr><td>journalMaxFileLength</td><td>xs:integer</td><td></td></tr>
<tr><td>journalMaxFileLength</td><td>xs:string</td><td></td></tr>
<tr><td>indexWriteBatchSize</td><td>xs:integer</td><td></td></tr>
<tr><td>enableIndexWriteAsync</td><td>xs:boolean</td><td></td></tr>
<tr><td>enableJournalDiskSyncs</td><td>xs:boolean</td><td></td></tr>

View File

@ -1243,7 +1243,7 @@ h4. Properties
|| Property Name || Type || Description ||
| brokerName | _java.lang.String_ | {html}{html} |
| directory | _java.io.File_ | {html}{html} |
| journalMaxFileLength | _int_ | {html}{html} |
| journalMaxFileLength | _java.lang.String_ | {html}{html} |
| indexWriteBatchSize | _int_ | {html}{html} |
| enableIndexWriteAsync | _boolean_ | {html}{html} |
| enableJournalDiskSyncs | _boolean_ | {html}{html} |