revert change of max file size to long as it will impact index size and 2gb is a reasonable max atm

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@802781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2009-08-10 13:13:33 +00:00
parent 747a2383f4
commit c42d980db8
5 changed files with 14 additions and 14 deletions

View File

@ -193,7 +193,7 @@ public class KahaDBPersistenceAdapter implements PersistenceAdapter {
* Get the journalMaxFileLength * Get the journalMaxFileLength
* @return the journalMaxFileLength * @return the journalMaxFileLength
*/ */
public long getJournalMaxFileLength() { public int getJournalMaxFileLength() {
return this.letter.getJournalMaxFileLength(); return this.letter.getJournalMaxFileLength();
} }
@ -204,7 +204,7 @@ public class KahaDBPersistenceAdapter implements PersistenceAdapter {
* *
* @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor" * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
*/ */
public void setJournalMaxFileLength(long journalMaxFileLength) { public void setJournalMaxFileLength(int journalMaxFileLength) {
this.letter.setJournalMaxFileLength(journalMaxFileLength); this.letter.setJournalMaxFileLength(journalMaxFileLength);
} }

View File

@ -141,7 +141,7 @@ public class MessageDatabase {
protected boolean enableJournalDiskSyncs=true; protected boolean enableJournalDiskSyncs=true;
long checkpointInterval = 5*1000; long checkpointInterval = 5*1000;
long cleanupInterval = 30*1000; long cleanupInterval = 30*1000;
long journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH; int journalMaxFileLength = Journal.DEFAULT_MAX_FILE_LENGTH;
boolean enableIndexWriteAsync = false; boolean enableIndexWriteAsync = false;
int setIndexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE; int setIndexWriteBatchSize = PageFile.DEFAULT_WRITE_BATCH_SIZE;
@ -1396,11 +1396,11 @@ public class MessageDatabase {
this.cleanupInterval = cleanupInterval; this.cleanupInterval = cleanupInterval;
} }
public void setJournalMaxFileLength(long journalMaxFileLength) { public void setJournalMaxFileLength(int journalMaxFileLength) {
this.journalMaxFileLength = journalMaxFileLength; this.journalMaxFileLength = journalMaxFileLength;
} }
public long getJournalMaxFileLength() { public int getJournalMaxFileLength() {
return journalMaxFileLength; return journalMaxFileLength;
} }

View File

@ -32,9 +32,9 @@ public class DataFile extends LinkedNode<DataFile> implements Comparable<DataFil
protected final File file; protected final File file;
protected final Integer dataFileId; protected final Integer dataFileId;
protected long length; protected int length;
DataFile(File file, int number, long preferedSize) { DataFile(File file, int number, int preferedSize) {
this.file = file; this.file = file;
this.dataFileId = Integer.valueOf(number); this.dataFileId = Integer.valueOf(number);
length = (int)(file.exists() ? file.length() : 0); length = (int)(file.exists() ? file.length() : 0);
@ -48,11 +48,11 @@ public class DataFile extends LinkedNode<DataFile> implements Comparable<DataFil
return dataFileId; return dataFileId;
} }
public synchronized long getLength() { public synchronized int getLength() {
return length; return length;
} }
public void setLength(long length) { public void setLength(int length) {
this.length = length; this.length = length;
} }

View File

@ -80,8 +80,8 @@ public class Journal {
protected String fileSuffix = DEFAULT_FILE_SUFFIX; protected String fileSuffix = DEFAULT_FILE_SUFFIX;
protected boolean started; protected boolean started;
protected long maxFileLength = DEFAULT_MAX_FILE_LENGTH; protected int maxFileLength = DEFAULT_MAX_FILE_LENGTH;
protected long preferedFileLength = DEFAULT_MAX_FILE_LENGTH - PREFERED_DIFF; protected int preferedFileLength = DEFAULT_MAX_FILE_LENGTH - PREFERED_DIFF;
protected DataFileAppender appender; protected DataFileAppender appender;
protected DataFileAccessorPool accessorPool; protected DataFileAccessorPool accessorPool;
@ -357,14 +357,14 @@ public class Journal {
/** /**
* @return the maxFileLength * @return the maxFileLength
*/ */
public long getMaxFileLength() { public int getMaxFileLength() {
return maxFileLength; return maxFileLength;
} }
/** /**
* @param maxFileLength the maxFileLength to set * @param maxFileLength the maxFileLength to set
*/ */
public void setMaxFileLength(long maxFileLength) { public void setMaxFileLength(int maxFileLength) {
this.maxFileLength = maxFileLength; this.maxFileLength = maxFileLength;
} }

View File

@ -26,7 +26,7 @@ import java.io.RandomAccessFile;
*/ */
public class ReadOnlyDataFile extends DataFile { public class ReadOnlyDataFile extends DataFile {
ReadOnlyDataFile(File file, int number, long preferedSize) { ReadOnlyDataFile(File file, int number, int preferedSize) {
super(file, number, preferedSize); super(file, number, preferedSize);
} }