@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
@Override public int compare(Invocation o1, Invocation o2) { return o2.getEntryPointIdx().compareTo(o1.getEntryPointIdx()); } },
/** * * @param invocation */ void addInvocation(Invocation invocation) { if (!invocation.isEntryPoint()) { throw new IllegalStateException("Invocation is not an entry point!"); } // Remove some old data if the limit is exceeded if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { synchronized (this) { if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { Set<Integer> keySet = invocations.keySet(); List<Integer> sorted = new ArrayList<Integer>(keySet); Collections.sort(sorted, Collections.reverseOrder()); if (keySet.removeAll(sorted.subList(DEFAULT_INVOCATIONS_LIMIT / 2, sorted.size()))) { ProbeLogger.LOG.monitoringLimitExceeded(Invocation.class.getSimpleName(), DEFAULT_INVOCATIONS_LIMIT); } } } } invocations.put(invocation.getEntryPointIdx(), invocation); }
/** * * @param invocation */ void addInvocation(Invocation invocation) { if (!invocation.isEntryPoint()) { throw new IllegalStateException("Invocation is not an entry point!"); } // Remove some old data if the limit is exceeded if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { synchronized (this) { if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { Set<Integer> keySet = invocations.keySet(); List<Integer> sorted = new ArrayList<Integer>(keySet); Collections.sort(sorted, Collections.reverseOrder()); if (keySet.removeAll(sorted.subList(DEFAULT_INVOCATIONS_LIMIT / 2, sorted.size()))) { ProbeLogger.LOG.monitoringLimitExceeded(Invocation.class.getSimpleName(), DEFAULT_INVOCATIONS_LIMIT); } } } } invocations.put(invocation.getEntryPointIdx(), invocation); }
/** * * @param invocation */ void addInvocation(Invocation invocation) { if (!invocation.isEntryPoint()) { throw new IllegalStateException("Invocation is not an entry point!"); } // Remove some old data if the limit is exceeded if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { synchronized (this) { if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { Set<Integer> keySet = invocations.keySet(); List<Integer> sorted = new ArrayList<Integer>(keySet); Collections.sort(sorted, Collections.reverseOrder()); if (keySet.removeAll(sorted.subList(DEFAULT_INVOCATIONS_LIMIT / 2, sorted.size()))) { ProbeLogger.LOG.monitoringLimitExceeded(Invocation.class.getSimpleName(), DEFAULT_INVOCATIONS_LIMIT); } } } } invocations.put(invocation.getEntryPointIdx(), invocation); }
/** * * @param invocation */ void addInvocation(Invocation invocation) { if (!invocation.isEntryPoint()) { throw new IllegalStateException("Invocation is not an entry point!"); } // Remove some old data if the limit is exceeded if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { synchronized (this) { if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { Set<Integer> keySet = invocations.keySet(); List<Integer> sorted = new ArrayList<Integer>(keySet); Collections.sort(sorted, Collections.reverseOrder()); if (keySet.removeAll(sorted.subList(DEFAULT_INVOCATIONS_LIMIT / 2, sorted.size()))) { ProbeLogger.LOG.monitoringLimitExceeded(Invocation.class.getSimpleName(), DEFAULT_INVOCATIONS_LIMIT); } } } } invocations.put(invocation.getEntryPointIdx(), invocation); }
/** * * @param invocation */ void addInvocation(Invocation invocation) { if (!invocation.isEntryPoint()) { throw new IllegalStateException("Invocation is not an entry point!"); } // Remove some old data if the limit is exceeded if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { synchronized (this) { if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { Set<Integer> keySet = invocations.keySet(); List<Integer> sorted = new ArrayList<Integer>(keySet); Collections.sort(sorted, Collections.reverseOrder()); if (keySet.removeAll(sorted.subList(DEFAULT_INVOCATIONS_LIMIT / 2, sorted.size()))) { ProbeLogger.LOG.monitoringLimitExceeded(Invocation.class.getSimpleName(), DEFAULT_INVOCATIONS_LIMIT); } } } } invocations.put(invocation.getEntryPointIdx(), invocation); }
/** * * @param invocation */ void addInvocation(Invocation invocation) { if (!invocation.isEntryPoint()) { throw new IllegalStateException("Invocation is not an entry point!"); } // Remove some old data if the limit is exceeded if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { synchronized (this) { if (invocations.size() > DEFAULT_INVOCATIONS_LIMIT) { Set<Integer> keySet = invocations.keySet(); List<Integer> sorted = new ArrayList<Integer>(keySet); Collections.sort(sorted, Collections.reverseOrder()); if (keySet.removeAll(sorted.subList(DEFAULT_INVOCATIONS_LIMIT / 2, sorted.size()))) { ProbeLogger.LOG.monitoringLimitExceeded(Invocation.class.getSimpleName(), DEFAULT_INVOCATIONS_LIMIT); } } } } invocations.put(invocation.getEntryPointIdx(), invocation); }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }
static JsonObjectBuilder createBasicInvocationJson(Invocation invocation, Probe probe) { JsonObjectBuilder invocationBuilder = Json.objectBuilder(); if (invocation.getEntryPointIdx() != null) { invocationBuilder.add(ID, invocation.getEntryPointIdx()); } if (invocation.getInterceptedBean() != null) { invocationBuilder.add(INTERCEPTED_BEAN, createSimpleBeanJson(invocation.getInterceptedBean(), probe)); } else { invocationBuilder.add(DECLARING_CLASS, invocation.getDeclaringClassName()); } if (invocation.getDescription() != null) { invocationBuilder.add(DESCRIPTION, invocation.getDescription()); } invocationBuilder.add(METHOD_NAME, invocation.getMethodName()); invocationBuilder.add(START, invocation.getStart()); invocationBuilder.add(TIME, invocation.getDuration()); return invocationBuilder; }