Index

A C D E F G H I M N O P R S T V W 
All Classes and Interfaces|All Packages|Serialized Form

A

amount() - Method in record class com.cotani.reward.api.CurrencyGrant
Returns the value of the amount record component.
amount() - Method in record class com.cotani.reward.api.ItemGrant
Returns the value of the amount record component.
availableAt() - Method in exception class com.cotani.reward.api.RewardOnCooldownException
 

C

claimAndSettleAsync(UUID, RewardId) - Method in interface com.cotani.reward.api.RewardSettlementService
Claims and settles a reward in one asynchronous workflow.
claimAsync(RewardClaimCommand) - Method in interface com.cotani.reward.api.RewardRepository
Atomically evaluates cooldown/streak state and stores a claim receipt.
claimAsync(RewardClaimCommand) - Method in class com.cotani.reward.storage.StorageRewardRepository
 
claimAsync(UUID, RewardId) - Method in interface com.cotani.reward.api.RewardService
Claims a reward with a newly generated idempotency key.
claimAsync(UUID, RewardId, RewardClaimId) - Method in interface com.cotani.reward.api.RewardService
Claims a reward using a caller-owned idempotency key suitable for settlement retries.
claimedAt() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the claimedAt record component.
claimId() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the claimId record component.
claimId() - Method in record class com.cotani.reward.api.RewardClaimCommand
Returns the value of the claimId record component.
claimId() - Method in exception class com.cotani.reward.api.RewardClaimConflictException
 
claimId() - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Returns the value of the claimId record component.
claimOrRecoverAsync(UUID, RewardId) - Method in interface com.cotani.reward.api.RewardSettlementService
Recovers this player's pending claim for the reward, or creates a new claim when none exists.
claimRetention() - Method in record class com.cotani.reward.api.RewardServiceOptions
Returns the value of the claimRetention record component.
close() - Method in interface com.cotani.reward.api.RewardService
Starts asynchronous shutdown and rejects new operations.
com.cotani.reward - package com.cotani.reward
 
com.cotani.reward.api - package com.cotani.reward.api
 
com.cotani.reward.storage - package com.cotani.reward.storage
 
cooldown() - Method in record class com.cotani.reward.api.RewardDefinition
Returns the value of the cooldown record component.
CotaniRewards - Class in com.cotani.reward
Factories for the cotani-reward module.
CreateRewardIndexesMigration - Class in com.cotani.reward.storage
Adds indexes used by claim retention and player history queries.
CreateRewardIndexesMigration() - Constructor for class com.cotani.reward.storage.CreateRewardIndexesMigration
 
CreateRewardTablesMigration - Class in com.cotani.reward.storage
Creates the reward claim receipts and per-player streak state tables.
CreateRewardTablesMigration() - Constructor for class com.cotani.reward.storage.CreateRewardTablesMigration
 
currency() - Method in record class com.cotani.reward.api.CurrencyGrant
Returns the value of the currency record component.
CurrencyGrant - Record Class in com.cotani.reward.api
A currency amount to be delivered by a host-owned settlement adapter.
CurrencyGrant(String, BigDecimal) - Constructor for record class com.cotani.reward.api.CurrencyGrant
Creates an instance of a CurrencyGrant record class.

D

defaults() - Static method in record class com.cotani.reward.api.RewardServiceOptions
 
definition() - Method in record class com.cotani.reward.api.RewardClaimCommand
Returns the value of the definition record component.
description() - Method in class com.cotani.reward.storage.CreateRewardIndexesMigration
 
description() - Method in class com.cotani.reward.storage.CreateRewardTablesMigration
 
description() - Method in class com.cotani.reward.storage.MigrateRewardSettlementMigration
 

E

equals(Object) - Method in record class com.cotani.reward.api.CurrencyGrant
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.ItemGrant
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardClaim
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardClaimCommand
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardClaimId
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardDefinition
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardId
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.reward.api.RewardServiceOptions
Indicates whether some other object is "equal to" this one.

F

findDefinition(RewardId) - Method in interface com.cotani.reward.api.RewardService
Returns a registered definition, if present.
findPendingClaimAsync(UUID, RewardId) - Method in interface com.cotani.reward.api.RewardRepository
Finds the oldest unsettled claim for one player and reward without scanning unrelated claims.
findPendingClaimAsync(UUID, RewardId) - Method in interface com.cotani.reward.api.RewardService
Finds an unsettled claim for one player and reward without scanning a bounded global page.
findPendingClaimAsync(UUID, RewardId) - Method in class com.cotani.reward.storage.StorageRewardRepository
 
fromRepository(RewardRepository) - Static method in class com.cotani.reward.CotaniRewards
Creates a service over a caller-owned repository.
fromRepository(RewardRepository, RewardServiceOptions) - Static method in class com.cotani.reward.CotaniRewards
Creates a service over a caller-owned repository with explicit options.

G

grantIndex() - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Returns the value of the grantIndex record component.
grants() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the grants record component.
grants() - Method in record class com.cotani.reward.api.RewardDefinition
Returns the value of the grants record component.

H

hashCode() - Method in record class com.cotani.reward.api.CurrencyGrant
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.ItemGrant
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardClaim
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardClaimCommand
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardClaimId
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardDefinition
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardId
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.reward.api.RewardServiceOptions
Returns a hash code value for this object.

I

id() - Method in record class com.cotani.reward.api.RewardDefinition
Returns the value of the id record component.
inMemory() - Static method in class com.cotani.reward.CotaniRewards
Creates an isolated in-memory reward service, suitable for tests or ephemeral servers.
inMemory(RewardServiceOptions) - Static method in class com.cotani.reward.CotaniRewards
Creates an in-memory reward service with explicit operational options.
ItemGrant - Record Class in com.cotani.reward.api
A namespaced item key and quantity to be delivered by a host adapter.
ItemGrant(String, int) - Constructor for record class com.cotani.reward.api.ItemGrant
Creates an instance of a ItemGrant record class.
itemKey() - Method in record class com.cotani.reward.api.ItemGrant
Returns the value of the itemKey record component.

M

markSettledAsync(RewardClaimId) - Method in interface com.cotani.reward.api.RewardRepository
Acknowledges a durable settlement; repeating the acknowledgement is idempotent.
markSettledAsync(RewardClaimId) - Method in interface com.cotani.reward.api.RewardService
Acknowledges delivery of a claim; repeating the acknowledgement is safe.
markSettledAsync(RewardClaimId) - Method in class com.cotani.reward.storage.StorageRewardRepository
 
maxStreak() - Method in record class com.cotani.reward.api.RewardDefinition
Returns the value of the maxStreak record component.
migrate(Schema) - Method in class com.cotani.reward.storage.CreateRewardIndexesMigration
 
migrate(Schema) - Method in class com.cotani.reward.storage.CreateRewardTablesMigration
 
migrate(Schema) - Method in class com.cotani.reward.storage.MigrateRewardSettlementMigration
 
MigrateRewardSettlementMigration - Class in com.cotani.reward.storage
Adds durable settlement acknowledgements to existing reward claim tables.
MigrateRewardSettlementMigration() - Constructor for class com.cotani.reward.storage.MigrateRewardSettlementMigration
 
migrations() - Static method in class com.cotani.reward.storage.StorageRewardRepository
 

N

nextAvailableAt() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the nextAvailableAt record component.
now() - Method in record class com.cotani.reward.api.RewardClaimCommand
Returns the value of the now record component.

O

of(String) - Static method in record class com.cotani.reward.api.RewardId
 

P

pendingClaimsAsync(int) - Method in interface com.cotani.reward.api.RewardRepository
Loads a bounded oldest-first list of claims that still need settlement.
pendingClaimsAsync(int) - Method in interface com.cotani.reward.api.RewardService
Loads bounded claims whose grants have not yet been acknowledged as settled.
pendingClaimsAsync(int) - Method in class com.cotani.reward.storage.StorageRewardRepository
 
playerId() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the playerId record component.
playerId() - Method in record class com.cotani.reward.api.RewardClaimCommand
Returns the value of the playerId record component.
playerId() - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Returns the value of the playerId record component.
playerId() - Method in exception class com.cotani.reward.api.RewardOnCooldownException
 
purgeClaimsAsync() - Method in interface com.cotani.reward.api.RewardService
Removes old claim receipts according to the configured retention period.
purgeClaimsBeforeAsync(Instant) - Method in interface com.cotani.reward.api.RewardRepository
Removes old settled idempotency receipts; pending receipts and player state are retained.
purgeClaimsBeforeAsync(Instant) - Method in class com.cotani.reward.storage.StorageRewardRepository
 

R

random() - Static method in record class com.cotani.reward.api.RewardClaimId
 
register(RewardDefinition) - Method in interface com.cotani.reward.api.RewardService
Registers a definition; duplicate ids are rejected.
repositoryTimeout() - Method in record class com.cotani.reward.api.RewardServiceOptions
Returns the value of the repositoryTimeout record component.
RewardClaim - Record Class in com.cotani.reward.api
Immutable successful claim receipt and snapshot of the grants to settle.
RewardClaim(RewardClaimId, UUID, RewardId, Instant, Instant, int, long, List) - Constructor for record class com.cotani.reward.api.RewardClaim
Creates an instance of a RewardClaim record class.
RewardClaimCommand - Record Class in com.cotani.reward.api
Complete immutable input for an atomic repository claim.
RewardClaimCommand(RewardClaimId, UUID, RewardDefinition, Instant) - Constructor for record class com.cotani.reward.api.RewardClaimCommand
Creates an instance of a RewardClaimCommand record class.
RewardClaimConflictException - Exception Class in com.cotani.reward.api
Raised when an idempotency key is reused for a different player or reward.
RewardClaimConflictException(RewardClaimId) - Constructor for exception class com.cotani.reward.api.RewardClaimConflictException
 
RewardClaimId - Record Class in com.cotani.reward.api
Idempotency key for one logical reward claim attempt.
RewardClaimId(UUID) - Constructor for record class com.cotani.reward.api.RewardClaimId
Creates an instance of a RewardClaimId record class.
RewardDefinition - Record Class in com.cotani.reward.api
Immutable definition containing cooldown, streak rules and the grants for a reward.
RewardDefinition(RewardId, Duration, Duration, int, List) - Constructor for record class com.cotani.reward.api.RewardDefinition
Creates an instance of a RewardDefinition record class.
RewardException - Exception Class in com.cotani.reward.api
Base exception for expected reward-domain failures.
RewardException(String) - Constructor for exception class com.cotani.reward.api.RewardException
 
RewardException(String, Throwable) - Constructor for exception class com.cotani.reward.api.RewardException
 
RewardGrant - Interface in com.cotani.reward.api
Immutable value that a host plugin can settle after a claim succeeds.
RewardGrantHandler - Interface in com.cotani.reward.api
Delivers one immutable reward grant to its target player.
RewardGrantHandler.RewardSettlementContext - Record Class in com.cotani.reward.api
Immutable identifiers used to make delivery retries safe.
rewardId() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the rewardId record component.
rewardId() - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Returns the value of the rewardId record component.
rewardId() - Method in exception class com.cotani.reward.api.RewardNotFoundException
 
rewardId() - Method in exception class com.cotani.reward.api.RewardOnCooldownException
 
RewardId - Record Class in com.cotani.reward.api
Stable identifier for a registered reward definition.
RewardId(String) - Constructor for record class com.cotani.reward.api.RewardId
Creates an instance of a RewardId record class.
RewardNotFoundException - Exception Class in com.cotani.reward.api
Raised when a service claim references an unregistered reward.
RewardNotFoundException(RewardId) - Constructor for exception class com.cotani.reward.api.RewardNotFoundException
 
RewardOnCooldownException - Exception Class in com.cotani.reward.api
Raised when a player tries to claim before the reward cooldown ends.
RewardOnCooldownException(UUID, RewardId, Instant) - Constructor for exception class com.cotani.reward.api.RewardOnCooldownException
 
RewardRepository - Interface in com.cotani.reward.api
Bukkit-free persistence SPI for atomic, idempotent reward claims.
RewardService - Interface in com.cotani.reward.api
Asynchronous reward registration and idempotent claim use cases.
RewardServiceOptions - Record Class in com.cotani.reward.api
Operational limits for reward repository calls and idempotency retention.
RewardServiceOptions(Duration, Duration) - Constructor for record class com.cotani.reward.api.RewardServiceOptions
Creates an instance of a RewardServiceOptions record class.
RewardSettlementContext(UUID, RewardClaimId, RewardId, int) - Constructor for record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Creates an instance of a RewardSettlementContext record class.
RewardSettlementService - Interface in com.cotani.reward.api
Coordinates grant delivery and acknowledges a claim only after every grant succeeds.

S

settleAsync(RewardClaim) - Method in interface com.cotani.reward.api.RewardSettlementService
Settles a previously created claim, including a claim recovered after a restart.
settleAsync(RewardGrantHandler.RewardSettlementContext, RewardGrant) - Method in interface com.cotani.reward.api.RewardGrantHandler
Delivers a grant.
settlement(RewardService, List) - Static method in class com.cotani.reward.CotaniRewards
Creates a settlement workflow over a reward service and its grant handlers.
settlePendingAsync(int) - Method in interface com.cotani.reward.api.RewardSettlementService
Loads and settles a bounded batch of pending claims.
StorageRewardRepository - Class in com.cotani.reward.storage
SQL-backed repository with atomic cooldown, streak and idempotency handling.
StorageRewardRepository(CotaniStorage) - Constructor for class com.cotani.reward.storage.StorageRewardRepository
 
streak() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the streak record component.
streakWindow() - Method in record class com.cotani.reward.api.RewardDefinition
Returns the value of the streakWindow record component.
supports(RewardGrant) - Method in interface com.cotani.reward.api.RewardGrantHandler
Returns whether this handler owns the supplied grant type.

T

toString() - Method in record class com.cotani.reward.api.CurrencyGrant
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.ItemGrant
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardClaim
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardClaimCommand
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardClaimId
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardDefinition
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardGrantHandler.RewardSettlementContext
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardId
Returns a string representation of this record class.
toString() - Method in record class com.cotani.reward.api.RewardServiceOptions
Returns a string representation of this record class.
totalClaims() - Method in record class com.cotani.reward.api.RewardClaim
Returns the value of the totalClaims record component.

V

value() - Method in record class com.cotani.reward.api.RewardClaimId
Returns the value of the value record component.
value() - Method in record class com.cotani.reward.api.RewardId
Returns the value of the value record component.
version() - Method in class com.cotani.reward.storage.CreateRewardIndexesMigration
 
version() - Method in class com.cotani.reward.storage.CreateRewardTablesMigration
 
version() - Method in class com.cotani.reward.storage.MigrateRewardSettlementMigration
 

W

withClaimRetention(Duration) - Method in record class com.cotani.reward.api.RewardServiceOptions
 
withRepositoryTimeout(Duration) - Method in record class com.cotani.reward.api.RewardServiceOptions
 
withRepositoryTimeout(CompletionStage) - Method in record class com.cotani.reward.api.RewardServiceOptions
Applies a caller-visible timeout without cancelling the durable repository operation.
A C D E F G H I M N O P R S T V W 
All Classes and Interfaces|All Packages|Serialized Form