UpdateManager changed to account for Store and Temp data usage as well as memory usage

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@567646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-08-20 10:34:59 +00:00
parent 85fc6dd267
commit 625cd7cdb6
3 changed files with 12 additions and 7 deletions

View File

@ -28,10 +28,11 @@ import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.Message;
import org.apache.activemq.command.MessageAck;
import org.apache.activemq.command.MessageId;
import org.apache.activemq.memory.UsageManager;
import org.apache.activemq.store.MessageRecoveryListener;
import org.apache.activemq.store.MessageStore;
import org.apache.activemq.store.jpa.model.StoredMessage;
import org.apache.activemq.usage.MemoryUsage;
import org.apache.activemq.usage.SystemUsage;
import org.apache.activemq.util.ByteSequence;
import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.wireformat.WireFormat;
@ -190,7 +191,7 @@ public class JPAMessageStore implements MessageStore {
lastMessageId.set(-1);
}
public void setUsageManager(UsageManager usageManager) {
public void setMemoryUsage(MemoryUsage memoeyUSage){
}
public void start() throws Exception {
@ -198,5 +199,4 @@ public class JPAMessageStore implements MessageStore {
public void stop() throws Exception {
}
}

View File

@ -32,13 +32,13 @@ import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.apache.activemq.memory.UsageManager;
import org.apache.activemq.openwire.OpenWireFormatFactory;
import org.apache.activemq.store.MessageStore;
import org.apache.activemq.store.PersistenceAdapter;
import org.apache.activemq.store.TopicMessageStore;
import org.apache.activemq.store.TransactionStore;
import org.apache.activemq.store.memory.MemoryTransactionStore;
import org.apache.activemq.usage.SystemUsage;
import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.wireformat.WireFormat;
import org.apache.commons.logging.Log;
@ -187,7 +187,7 @@ public class JPAPersistenceAdapter implements PersistenceAdapter {
return false;
}
public void setUsageManager(UsageManager usageManager) {
public void setUsageManager(SystemUsage usageManager) {
}
public void start() throws Exception {
@ -254,5 +254,9 @@ public class JPAPersistenceAdapter implements PersistenceAdapter {
public void setDirectory(File dir) {
}
public long size(){
return 0;
}
}

View File

@ -28,10 +28,11 @@ import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.Message;
import org.apache.activemq.command.MessageAck;
import org.apache.activemq.command.MessageId;
import org.apache.activemq.memory.UsageManager;
import org.apache.activemq.store.MessageRecoveryListener;
import org.apache.activemq.store.ReferenceStore;
import org.apache.activemq.store.jpa.model.StoredMessageReference;
import org.apache.activemq.usage.MemoryUsage;
import org.apache.activemq.usage.SystemUsage;
import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.wireformat.WireFormat;
@ -198,7 +199,7 @@ public class JPAReferenceStore implements ReferenceStore {
lastMessageId.set(-1);
}
public void setUsageManager(UsageManager usageManager) {
public void setMemoryUsage(MemoryUsage memoeyUSage){
}
public void start() throws Exception {