@NotThreadSafe public static class ProposalStats.Builder extends Object
ProposalStats
object.Constructor and Description |
---|
Builder(ProposalObservabilityTrackingOptions proposalObservabilityTrackingOptions) |
Modifier and Type | Method and Description |
---|---|
ProposalStats |
seal()
Build a
ProposalStats object and seals this ProposalStats.Builder shut,
rendering it unable to have more statistics added to it. |
void |
trackProposalAccepted(ActionType actionType,
Optional<DetailedProposal.Result> detailedProposal)
Track that a proposal has been accepted.
|
void |
trackProposalGenerated()
Track that a proposal has been generated.
|
void |
trackProposalRejected(Optional<String> rejectingGoal,
Optional<DetailedProposal.Result> detailedProposal)
Track that a proposal has been rejected, and Optionally indicate what goal rejected it.
|
public Builder(ProposalObservabilityTrackingOptions proposalObservabilityTrackingOptions)
proposalObservabilityTrackingOptions
- - options denoting whether top proposal tracking is enabled and if so, how many proposals to track.
Top proposal tracking enables finer-grained tracking of all proposals generated (accepted and rejected), sorts out and keeps N of the most impactful ones (separated by rejection and acceptance)public void trackProposalGenerated()
public void trackProposalRejected(Optional<String> rejectingGoal, Optional<DetailedProposal.Result> detailedProposal)
rejectingGoal
- an Optional for the goal that generated the rejection.detailedProposal
- an Optional containing the details of the proposal that was just rejected.public void trackProposalAccepted(ActionType actionType, Optional<DetailedProposal.Result> detailedProposal)
detailedProposal
- an Optional containing the details of the proposal that was just accepted.public ProposalStats seal()
ProposalStats
object and seals this ProposalStats.Builder
shut,
rendering it unable to have more statistics added to it.ProposalStats
object.