Class DropwizardBundlesTracker
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<io.dropwizard.core.ConfiguredBundle>
-
- ru.vyarus.dropwizard.guice.debug.report.start.DropwizardBundlesTracker
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<io.dropwizard.core.ConfiguredBundle>,java.util.Collection<io.dropwizard.core.ConfiguredBundle>,java.util.List<io.dropwizard.core.ConfiguredBundle>,java.util.RandomAccess
public class DropwizardBundlesTracker extends java.util.ArrayList<io.dropwizard.core.ConfiguredBundle>Dropwizard bundles tracker for startup time report. Replaces bundles list insideBootstrapobject to detect bundles addition and wrap them to track run phase. Note that bundle added to collection AFTER initialization call. Also, bundle may add other bundles, which initialization would be called immediately and so it is impossible to measure initialization time of each bundle. So, instead of measuring bundle init time, bundle init done point is registered (it should be enough to highlight slow bundles).It is not possible to measure init time for bundles, registered before the guice bundle. Warning would be shown.
- Since:
- 09.03.2025
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DropwizardBundlesTracker(StatsInfo stats, StartupTimeInfo info, io.dropwizard.core.setup.Bootstrap bootstrap)Create bundles tracker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, io.dropwizard.core.ConfiguredBundle element)booleanadd(io.dropwizard.core.ConfiguredBundle configuredBundle)booleanaddAll(int index, java.util.Collection<? extends io.dropwizard.core.ConfiguredBundle> c)booleanaddAll(java.util.Collection<? extends io.dropwizard.core.ConfiguredBundle> c)com.google.common.base.StopwatchgetWebTimer()io.dropwizard.core.ConfiguredBundleset(int index, io.dropwizard.core.ConfiguredBundle element)-
Methods inherited from class java.util.ArrayList
clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
DropwizardBundlesTracker
public DropwizardBundlesTracker(StatsInfo stats, StartupTimeInfo info, io.dropwizard.core.setup.Bootstrap bootstrap)
Create bundles tracker.- Parameters:
stats- stat objectsinfo- startup time databootstrap- bootstrap instance
-
-
Method Detail
-
getWebTimer
public com.google.common.base.Stopwatch getWebTimer()
- Returns:
- web time tracker
-
add
public boolean add(io.dropwizard.core.ConfiguredBundle configuredBundle)
- Specified by:
addin interfacejava.util.Collection<io.dropwizard.core.ConfiguredBundle>- Specified by:
addin interfacejava.util.List<io.dropwizard.core.ConfiguredBundle>- Overrides:
addin classjava.util.ArrayList<io.dropwizard.core.ConfiguredBundle>
-
add
public void add(int index, io.dropwizard.core.ConfiguredBundle element)- Specified by:
addin interfacejava.util.List<io.dropwizard.core.ConfiguredBundle>- Overrides:
addin classjava.util.ArrayList<io.dropwizard.core.ConfiguredBundle>
-
addAll
public boolean addAll(java.util.Collection<? extends io.dropwizard.core.ConfiguredBundle> c)
- Specified by:
addAllin interfacejava.util.Collection<io.dropwizard.core.ConfiguredBundle>- Specified by:
addAllin interfacejava.util.List<io.dropwizard.core.ConfiguredBundle>- Overrides:
addAllin classjava.util.ArrayList<io.dropwizard.core.ConfiguredBundle>
-
addAll
public boolean addAll(int index, java.util.Collection<? extends io.dropwizard.core.ConfiguredBundle> c)- Specified by:
addAllin interfacejava.util.List<io.dropwizard.core.ConfiguredBundle>- Overrides:
addAllin classjava.util.ArrayList<io.dropwizard.core.ConfiguredBundle>
-
set
public io.dropwizard.core.ConfiguredBundle set(int index, io.dropwizard.core.ConfiguredBundle element)- Specified by:
setin interfacejava.util.List<io.dropwizard.core.ConfiguredBundle>- Overrides:
setin classjava.util.ArrayList<io.dropwizard.core.ConfiguredBundle>
-
-