Пример #1
0
 public void manage(MessageBean bean) {
   FixedQueue queue = getAndInitQueue();
   if (queue == null) {
     return;
   }
   queue.add(bean);
   ConfigurationVO vo = cfgVO;
   if (vo != null) {
     Set<Filter> filterSet = vo.getFilterSet();
     if (filterSet != null) {
       for (Filter filter : filterSet) {
         boolean ifContinue = filter.doFilter(bean);
         if (!ifContinue) {
           return;
         }
       }
     }
     long total = FixedQueue.getCharTotal();
     long bufferSize = vo.getBufferSize();
     if (total >= bufferSize) {
       IMemoryManager manager = vo.getMemoryManager();
       manager.manager(queue);
     }
   }
 }
Пример #2
0
 public void clearLog() {
   FixedQueue queue = getAndInitQueue();
   if (queue == null) {
     return;
   }
   queue.clear();
 }