Package io.quarkus.builder
Class BuildResult
java.lang.Object
io.quarkus.builder.BuildResult
The final result of a successful deployment operation.
- Author:
- David M. Lloyd
-
Constructor Summary
ConstructorsConstructorDescriptionBuildResult(ConcurrentHashMap<ItemId, BuildItem> simpleItems, ConcurrentHashMap<ItemId, List<BuildItem>> multiItems, Set<ItemId> finalIds, List<Diagnostic> diagnostics, long nanos, BuildMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseAll()Close all the resultant resources, logging any failures.<T extends SimpleBuildItem>
TConsume the value produced for the named item.<T extends MultiBuildItem>
List<T>consumeMulti(Class<T> type) Consume all the values produced for the named item.<T extends SimpleBuildItem>
TconsumeOptional(Class<T> type) Consume the value produced for the named item.Get the diagnostics reported during build.longgetDuration(TimeUnit timeUnit) Get the amount of elapsed time from the time the operation was initiated to the time it was completed.
-
Constructor Details
-
BuildResult
BuildResult(ConcurrentHashMap<ItemId, BuildItem> simpleItems, ConcurrentHashMap<ItemId, List<BuildItem>> multiItems, Set<ItemId> finalIds, List<Diagnostic> diagnostics, long nanos, BuildMetrics metrics)
-
-
Method Details
-
consume
Consume the value produced for the named item.- Parameters:
type- the item type (must not benull)- Returns:
- the produced item (may be
null) - Throws:
IllegalArgumentException- if this deployer was not declared to consumetype, or iftypeisnullClassCastException- if the cast failed
-
consumeOptional
Consume the value produced for the named item.- Parameters:
type- the item type (must not benull)- Returns:
- the produced item (may be
null) - Throws:
ClassCastException- if the cast failed
-
consumeMulti
Consume all the values produced for the named item.- Parameters:
type- the item element type (must not benull)- Returns:
- the produced items (may be empty, will not be
null) - Throws:
IllegalArgumentException- if this deployer was not declared to consumetype
-
getDiagnostics
Get the diagnostics reported during build.- Returns:
- the diagnostics reported during build
-
getDuration
Get the amount of elapsed time from the time the operation was initiated to the time it was completed.- Parameters:
timeUnit- the time unit to return- Returns:
- the time
-
getMetrics
- Returns:
- the build metrics
-
closeAll
Close all the resultant resources, logging any failures.- Throws:
RuntimeException
-