Increase post visit queue and post visit task map init capacity

pull/146/head
johnniang 2019-04-23 23:11:46 +08:00
parent 6b663cce6a
commit 85ba526a1d
1 changed files with 3 additions and 3 deletions

View File

@ -39,8 +39,8 @@ public class VisitEventListener {
initCapacity = (int) count; initCapacity = (int) count;
} }
postVisitQueueMap = new ConcurrentHashMap<>(initCapacity); postVisitQueueMap = new ConcurrentHashMap<>(initCapacity << 1);
postVisitTaskMap = new ConcurrentHashMap<>(initCapacity); postVisitTaskMap = new ConcurrentHashMap<>(initCapacity << 1);
this.executor = Executors.newCachedThreadPool(); this.executor = Executors.newCachedThreadPool();
} }
@ -109,7 +109,7 @@ public class VisitEventListener {
log.debug("Increased visits for post id: [{}]", postId); log.debug("Increased visits for post id: [{}]", postId);
} catch (InterruptedException e) { } catch (InterruptedException e) {
log.warn("Post visit task: " + Thread.currentThread().getName() + " was interrupted", e); log.debug("Post visit task: " + Thread.currentThread().getName() + " was interrupted", e);
// Ignore this exception // Ignore this exception
} }
} }