aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
diff options
context:
space:
mode:
authorGeorge Politis <gp@jitsi.org>2015-10-16 11:41:15 -0500
committerGeorge Politis <gp@jitsi.org>2015-10-16 11:41:15 -0500
commite0a28662b01960fa51d78629322a2f3322e34de5 (patch)
tree1c6ce6adfda0e3579555631dcbf30c225c0fa082 /src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
parent378d3fc05f30c42eaeb396f9bcf2a8d6f2ad43b8 (diff)
downloadjitsi-e0a28662b01960fa51d78629322a2f3322e34de5.zip
jitsi-e0a28662b01960fa51d78629322a2f3322e34de5.tar.gz
jitsi-e0a28662b01960fa51d78629322a2f3322e34de5.tar.bz2
Uses an EvictingQueue instead of an ArrayList in the PacketLoggingServiceImpl.
Diffstat (limited to 'src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
index 1799dbf..1954f99 100644
--- a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
@@ -20,6 +20,7 @@ package net.java.sip.communicator.impl.packetlogging;
import java.io.*;
import java.util.*;
+import com.google.common.collect.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.fileaccess.*;
@@ -769,7 +770,7 @@ public class PacketLoggingServiceImpl
/**
* List of packets queued to be written in the file.
*/
- private final List<Packet> pktsToSave = new ArrayList<Packet>();
+ private final Queue<Packet> pktsToSave = EvictingQueue.create(10);
/**
* Initializes a new <tt>SaverThread</tt>.
@@ -805,7 +806,7 @@ public class PacketLoggingServiceImpl
continue;
}
- pktToSave = pktsToSave.remove(0);
+ pktToSave = pktsToSave.poll();
}
if(pktToSave != null)