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:
Serializable,Cloneable,Iterable<io.dropwizard.core.ConfiguredBundle>,Collection<io.dropwizard.core.ConfiguredBundle>,List<io.dropwizard.core.ConfiguredBundle>,RandomAccess
Dropwizard bundles tracker for startup time report. Replaces bundles list inside
Bootstrap object 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:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDropwizardBundlesTracker(StatsInfo stats, StartupTimeInfo info, io.dropwizard.core.setup.Bootstrap bootstrap) Create bundles tracker. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, io.dropwizard.core.ConfiguredBundle element) booleanadd(io.dropwizard.core.ConfiguredBundle configuredBundle) booleanaddAll(int index, Collection<? extends io.dropwizard.core.ConfiguredBundle> c) booleanaddAll(Collection<? extends io.dropwizard.core.ConfiguredBundle> c) com.google.common.base.Stopwatchio.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, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
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 Details
-
getWebTimer
public com.google.common.base.Stopwatch getWebTimer()- Returns:
- web time tracker
-
add
public boolean add(io.dropwizard.core.ConfiguredBundle configuredBundle) -
add
public void add(int index, io.dropwizard.core.ConfiguredBundle element) -
addAll
-
addAll
-
set
public io.dropwizard.core.ConfiguredBundle set(int index, io.dropwizard.core.ConfiguredBundle element)
-