Index

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

A

amount() - Method in record class com.cotani.trade.api.TradeCurrency
Returns the value of the amount record component.
amount() - Method in record class com.cotani.trade.api.TradeItem
Returns the value of the amount record component.
assetKey() - Method in interface com.cotani.trade.api.TradeAsset
Stable asset identity used by the settlement adapter.
assetKey() - Method in record class com.cotani.trade.api.TradeCurrency
 
assetKey() - Method in record class com.cotani.trade.api.TradeItem
 
assets() - Method in record class com.cotani.trade.api.TradeOffer
Returns the value of the assets record component.
assetType() - Method in interface com.cotani.trade.api.TradeAsset
Stable asset type used by the settlement adapter.
assetType() - Method in record class com.cotani.trade.api.TradeCurrency
 
assetType() - Method in record class com.cotani.trade.api.TradeItem
 

B

bothConfirmed() - Method in record class com.cotani.trade.api.TradeSession
 

C

cancelAsync(TradeId, UUID) - Method in interface com.cotani.trade.api.TradeService
Cancels an open trade by one of its participants.
CANCELLED - Enum constant in enum class com.cotani.trade.api.TradeStatus
 
com.cotani.trade - package com.cotani.trade
 
com.cotani.trade.api - package com.cotani.trade.api
 
com.cotani.trade.api.event - package com.cotani.trade.api.event
 
COMPLETED - Enum constant in enum class com.cotani.trade.api.TradeSettlementStatus
 
COMPLETED - Enum constant in enum class com.cotani.trade.api.TradeStatus
 
confirmAsync(TradeId, UUID) - Method in interface com.cotani.trade.api.TradeService
Confirms the current offer revision and settles once both participants confirm.
confirmations() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the confirmations record component.
contains(UUID) - Method in record class com.cotani.trade.api.TradeSession
 
CotaniTrades - Class in com.cotani.trade
Factories for the cotani-trade module.
create(TradeId, UUID, UUID, TradeOptions, Instant) - Static method in record class com.cotani.trade.api.TradeSession
 
createAsync(TradeSession) - Method in interface com.cotani.trade.api.TradeRepository
Creates a trade and rejects an existing id atomically.
createAsync(UUID, UUID, TradeOptions) - Method in interface com.cotani.trade.api.TradeService
Creates an open trade when neither participant has another active trade.
createdAt() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the createdAt record component.

D

defaults() - Static method in record class com.cotani.trade.api.TradeOptions
 
defaults() - Static method in record class com.cotani.trade.api.TradeServiceOptions
 

E

empty() - Static method in record class com.cotani.trade.api.TradeSnapshot
 
empty(UUID) - Static method in record class com.cotani.trade.api.TradeOffer
 
encodedSizeBytes() - Method in interface com.cotani.trade.api.TradeAsset
Approximate UTF-8 size used to protect persistence and transport boundaries.
encodedSizeBytes() - Method in record class com.cotani.trade.api.TradeCurrency
 
encodedSizeBytes() - Method in record class com.cotani.trade.api.TradeItem
 
encodedSizeBytes() - Method in record class com.cotani.trade.api.TradeOffer
 
equals(Object) - Method in record class com.cotani.trade.api.event.TradeCancelledEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.event.TradeCompletedEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.event.TradeConfirmedEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.event.TradeCreatedEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.event.TradeExpiredEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.event.TradeFailedEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.event.TradeOfferChangedEvent
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeCurrency
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeId
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeItem
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeOffer
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeOptions
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeServiceOptions
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeSession
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeSettlement
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.cotani.trade.api.TradeSnapshot
Indicates whether some other object is "equal to" this one.
eventTimeout() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns the value of the eventTimeout record component.
EXPIRED - Enum constant in enum class com.cotani.trade.api.TradeStatus
 
expiresAt() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the expiresAt record component.

F

FAILED - Enum constant in enum class com.cotani.trade.api.TradeSettlementStatus
 
FAILED - Enum constant in enum class com.cotani.trade.api.TradeStatus
 
findAsync(TradeId) - Method in interface com.cotani.trade.api.TradeService
Finds a trade by id, including terminal sessions retained by the repository.
findByPlayerAsync(UUID) - Method in interface com.cotani.trade.api.TradeService
Finds the active trade containing one player.
fromRepositoryAsync(TradeRepository, TradeSettlementService) - Static method in class com.cotani.trade.CotaniTrades
Restores trade sessions asynchronously from a repository and reconciles pending settlements.
fromRepositoryAsync(TradeRepository, TradeSettlementService, EventBus, TradeServiceOptions) - Static method in class com.cotani.trade.CotaniTrades
Restores trade sessions with optional events and explicit options.

H

hashCode() - Method in record class com.cotani.trade.api.event.TradeCancelledEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.event.TradeCompletedEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.event.TradeConfirmedEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.event.TradeCreatedEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.event.TradeExpiredEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.event.TradeFailedEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.event.TradeOfferChangedEvent
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeCurrency
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeId
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeItem
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeOffer
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeOptions
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeSession
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeSettlement
Returns a hash code value for this object.
hashCode() - Method in record class com.cotani.trade.api.TradeSnapshot
Returns a hash code value for this object.

I

id() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the id record component.
initiatorId() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the initiatorId record component.
initiatorOffer() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the initiatorOffer record component.
initiatorOffer() - Method in record class com.cotani.trade.api.TradeSettlement
Returns the value of the initiatorOffer record component.
inMemory(TradeSettlementService) - Static method in class com.cotani.trade.CotaniTrades
Creates an in-memory trade service with an explicit settlement adapter.
inMemory(TradeSettlementService, EventBus, TradeServiceOptions) - Static method in class com.cotani.trade.CotaniTrades
Creates an in-memory trade service with optional event publication and explicit options.
isActiveAt(Instant) - Method in record class com.cotani.trade.api.TradeSession
 
isExpiredAt(Instant) - Method in record class com.cotani.trade.api.TradeSession
 

K

key() - Method in record class com.cotani.trade.api.TradeCurrency
Returns the value of the key record component.
key() - Method in record class com.cotani.trade.api.TradeItem
Returns the value of the key record component.

L

lifetime() - Method in record class com.cotani.trade.api.TradeOptions
Returns the value of the lifetime record component.
loadAsync() - Method in interface com.cotani.trade.api.TradeRepository
Loads all known trades without blocking the caller.

M

maximumAssetsPerParticipant() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns the value of the maximumAssetsPerParticipant record component.
maximumEncodedBytesPerParticipant() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns the value of the maximumEncodedBytesPerParticipant record component.
maximumRetainedTerminalTrades() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns the value of the maximumRetainedTerminalTrades record component.

N

NOT_STARTED - Enum constant in enum class com.cotani.trade.api.TradeSettlementStatus
 

O

of(UUID) - Static method in record class com.cotani.trade.api.TradeId
 
offerAsync(TradeId, UUID, List) - Method in interface com.cotani.trade.api.TradeService
Replaces one participant's offer and clears both confirmations.
offerOf(UUID) - Method in record class com.cotani.trade.api.TradeSession
 
OPEN - Enum constant in enum class com.cotani.trade.api.TradeStatus
 
ownerId() - Method in record class com.cotani.trade.api.TradeOffer
Returns the value of the ownerId record component.

P

PENDING - Enum constant in enum class com.cotani.trade.api.TradeSettlementStatus
 

R

random() - Static method in record class com.cotani.trade.api.TradeId
 
recipientId() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the recipientId record component.
recipientOffer() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the recipientOffer record component.
recipientOffer() - Method in record class com.cotani.trade.api.TradeSettlement
Returns the value of the recipientOffer record component.
repositoryTimeout() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns the value of the repositoryTimeout record component.
revision() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the revision record component.

S

serializedData() - Method in record class com.cotani.trade.api.TradeItem
Returns the value of the serializedData record component.
settleAsync(TradeSettlement) - Method in interface com.cotani.trade.api.TradeSettlementService
Settles one trade without blocking the caller.
SETTLEMENT_PENDING - Enum constant in enum class com.cotani.trade.api.TradeStatus
 
settlementTimeout() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns the value of the settlementTimeout record component.
status() - Method in record class com.cotani.trade.api.TradeSession
Returns the value of the status record component.
statusAsync(TradeId) - Method in interface com.cotani.trade.api.TradeSettlementService
Returns the durable settlement status for recovery.

T

toString() - Method in record class com.cotani.trade.api.event.TradeCancelledEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.event.TradeCompletedEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.event.TradeConfirmedEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.event.TradeCreatedEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.event.TradeExpiredEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.event.TradeFailedEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.event.TradeOfferChangedEvent
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeCurrency
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeId
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeItem
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeOffer
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeOptions
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeServiceOptions
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeSession
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeSettlement
Returns a string representation of this record class.
toString() - Method in record class com.cotani.trade.api.TradeSnapshot
Returns a string representation of this record class.
trade() - Method in record class com.cotani.trade.api.event.TradeCancelledEvent
Returns the value of the trade record component.
trade() - Method in record class com.cotani.trade.api.event.TradeCompletedEvent
Returns the value of the trade record component.
trade() - Method in record class com.cotani.trade.api.event.TradeConfirmedEvent
Returns the value of the trade record component.
trade() - Method in record class com.cotani.trade.api.event.TradeCreatedEvent
Returns the value of the trade record component.
trade() - Method in record class com.cotani.trade.api.event.TradeExpiredEvent
Returns the value of the trade record component.
trade() - Method in record class com.cotani.trade.api.event.TradeFailedEvent
Returns the value of the trade record component.
trade() - Method in record class com.cotani.trade.api.event.TradeOfferChangedEvent
Returns the value of the trade record component.
TradeAccessDeniedException - Exception Class in com.cotani.trade.api
Raised when a player that is not a participant attempts to operate a trade.
TradeAccessDeniedException(TradeId) - Constructor for exception class com.cotani.trade.api.TradeAccessDeniedException
 
TradeAsset - Interface in com.cotani.trade.api
Immutable asset offered by one participant.
TradeCancelledEvent - Record Class in com.cotani.trade.api.event
Published after an open trade is cancelled.
TradeCancelledEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeCancelledEvent
Creates an instance of a TradeCancelledEvent record class.
TradeCompletedEvent - Record Class in com.cotani.trade.api.event
Published after the settlement adapter completes successfully.
TradeCompletedEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeCompletedEvent
Creates an instance of a TradeCompletedEvent record class.
TradeConfirmedEvent - Record Class in com.cotani.trade.api.event
Published after one participant confirms the current offer revision.
TradeConfirmedEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeConfirmedEvent
Creates an instance of a TradeConfirmedEvent record class.
TradeConflictException - Exception Class in com.cotani.trade.api
Raised when a participant already owns another active trade or an operation conflicts.
TradeConflictException(String) - Constructor for exception class com.cotani.trade.api.TradeConflictException
 
TradeCreatedEvent - Record Class in com.cotani.trade.api.event
Published after a trade is persisted.
TradeCreatedEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeCreatedEvent
Creates an instance of a TradeCreatedEvent record class.
TradeCurrency - Record Class in com.cotani.trade.api
Immutable currency offer delegated to the configured settlement adapter.
TradeCurrency(CurrencyId, BigDecimal) - Constructor for record class com.cotani.trade.api.TradeCurrency
Creates an instance of a TradeCurrency record class.
TradeEvent - Interface in com.cotani.trade.api.event
Marker for immutable trade domain events.
TradeException - Exception Class in com.cotani.trade.api
Base exception for expected trade-domain failures.
TradeException(String) - Constructor for exception class com.cotani.trade.api.TradeException
 
TradeExpiredEvent - Record Class in com.cotani.trade.api.event
Published when an expired trade is observed by a subsequent mutation.
TradeExpiredEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeExpiredEvent
Creates an instance of a TradeExpiredEvent record class.
TradeFailedEvent - Record Class in com.cotani.trade.api.event
Published after settlement fails and the trade becomes terminal.
TradeFailedEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeFailedEvent
Creates an instance of a TradeFailedEvent record class.
tradeId() - Method in record class com.cotani.trade.api.TradeSettlement
Returns the value of the tradeId record component.
tradeId() - Method in exception class com.cotani.trade.api.TradeSettlementPendingException
 
TradeId - Record Class in com.cotani.trade.api
Stable identity and idempotency key for one trade session.
TradeId(UUID) - Constructor for record class com.cotani.trade.api.TradeId
Creates an instance of a TradeId record class.
TradeItem - Record Class in com.cotani.trade.api
Immutable serialized item offer that contains no live Bukkit object.
TradeItem(String, int, String) - Constructor for record class com.cotani.trade.api.TradeItem
Creates an instance of a TradeItem record class.
TradeNotFoundException - Exception Class in com.cotani.trade.api
Raised when a requested trade does not exist.
TradeNotFoundException(TradeId) - Constructor for exception class com.cotani.trade.api.TradeNotFoundException
 
TradeOffer - Record Class in com.cotani.trade.api
Immutable offer belonging to one participant.
TradeOffer(UUID, List) - Constructor for record class com.cotani.trade.api.TradeOffer
Creates an instance of a TradeOffer record class.
TradeOfferChangedEvent - Record Class in com.cotani.trade.api.event
Published after a participant changes their offer.
TradeOfferChangedEvent(TradeSession) - Constructor for record class com.cotani.trade.api.event.TradeOfferChangedEvent
Creates an instance of a TradeOfferChangedEvent record class.
TradeOptions - Record Class in com.cotani.trade.api
Options captured when a trade is created.
TradeOptions(Duration) - Constructor for record class com.cotani.trade.api.TradeOptions
Creates an instance of a TradeOptions record class.
TradeRepository - Interface in com.cotani.trade.api
Asynchronous persistence SPI for trade aggregates.
trades() - Method in record class com.cotani.trade.api.TradeSnapshot
Returns the value of the trades record component.
TradeService - Interface in com.cotani.trade.api
Asynchronous two-player trade orchestration.
TradeServiceOptions - Record Class in com.cotani.trade.api
Operational limits and deadlines for trade orchestration.
TradeServiceOptions(int, int, int, Duration, Duration, Duration) - Constructor for record class com.cotani.trade.api.TradeServiceOptions
Creates an instance of a TradeServiceOptions record class.
TradeServiceOptions(int, Duration, Duration, Duration) - Constructor for record class com.cotani.trade.api.TradeServiceOptions
Compatibility constructor using the default payload and retention limits.
TradeSession - Record Class in com.cotani.trade.api
Immutable two-player trade aggregate.
TradeSession(TradeId, UUID, UUID, Instant, Instant, long, TradeStatus, TradeOffer, TradeOffer, Set) - Constructor for record class com.cotani.trade.api.TradeSession
Creates an instance of a TradeSession record class.
TradeSettlement - Record Class in com.cotani.trade.api
Immutable settlement command with the trade id as an idempotency key.
TradeSettlement(TradeId, TradeOffer, TradeOffer) - Constructor for record class com.cotani.trade.api.TradeSettlement
Creates an instance of a TradeSettlement record class.
TradeSettlementFailedException - Exception Class in com.cotani.trade.api
Indicates that a durable settlement reconciliation confirmed failure.
TradeSettlementFailedException(TradeId) - Constructor for exception class com.cotani.trade.api.TradeSettlementFailedException
 
TradeSettlementPendingException - Exception Class in com.cotani.trade.api
Indicates that settlement is still pending and must not be retried as a new trade.
TradeSettlementPendingException(TradeId) - Constructor for exception class com.cotani.trade.api.TradeSettlementPendingException
 
TradeSettlementService - Interface in com.cotani.trade.api
SPI that atomically exchanges both offers and safely handles repeated settlement calls.
TradeSettlementStatus - Enum Class in com.cotani.trade.api
Durable status returned while reconciling a settlement after a timeout or restart.
TradeSnapshot - Record Class in com.cotani.trade.api
Immutable state loaded from a trade repository.
TradeSnapshot(List) - Constructor for record class com.cotani.trade.api.TradeSnapshot
Creates an instance of a TradeSnapshot record class.
TradeStateException - Exception Class in com.cotani.trade.api
Raised when an operation is invalid for the current trade lifecycle state.
TradeStateException(TradeId, TradeStatus) - Constructor for exception class com.cotani.trade.api.TradeStateException
 
TradeStatus - Enum Class in com.cotani.trade.api
Lifecycle state of a trade session.
TradeTimeoutScheduler - Interface in com.cotani.trade.api
Owns bounded timeout scheduling for trade operations.

U

UNKNOWN - Enum constant in enum class com.cotani.trade.api.TradeSettlementStatus
 
updateAsync(TradeId, long, TradeSession) - Method in interface com.cotani.trade.api.TradeRepository
Replaces a trade only when its persisted revision equals expectedRevision.
utf8Size(String) - Static method in interface com.cotani.trade.api.TradeAsset
Returns the UTF-8 size of a stable value.

V

value() - Method in record class com.cotani.trade.api.TradeId
Returns the value of the value record component.
valueOf(String) - Static method in enum class com.cotani.trade.api.TradeSettlementStatus
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class com.cotani.trade.api.TradeStatus
Returns the enum constant of this class with the specified name.
values() - Static method in enum class com.cotani.trade.api.TradeSettlementStatus
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class com.cotani.trade.api.TradeStatus
Returns an array containing the constants of this enum class, in the order they are declared.

W

withConfirmation(UUID) - Method in record class com.cotani.trade.api.TradeSession
 
withEventTimeout(Duration) - Method in record class com.cotani.trade.api.TradeServiceOptions
 
withLifetime(Duration) - Method in record class com.cotani.trade.api.TradeOptions
 
withMaximumAssetsPerParticipant(int) - Method in record class com.cotani.trade.api.TradeServiceOptions
 
withMaximumEncodedBytesPerParticipant(int) - Method in record class com.cotani.trade.api.TradeServiceOptions
 
withMaximumRetainedTerminalTrades(int) - Method in record class com.cotani.trade.api.TradeServiceOptions
 
withOffer(UUID, List) - Method in record class com.cotani.trade.api.TradeSession
 
withRepositoryTimeout(Duration) - Method in record class com.cotani.trade.api.TradeServiceOptions
 
withSettlementTimeout(Duration) - Method in record class com.cotani.trade.api.TradeServiceOptions
 
withStatus(TradeStatus) - Method in record class com.cotani.trade.api.TradeSession
 
withTimeout(CompletionStage, Duration, String) - Method in interface com.cotani.trade.api.TradeTimeoutScheduler
Completes with the source result or exceptionally after timeout.
A B C D E F H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Serialized Form