Class DefaultKeyResolver<AID extends AggregateId>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String resolvePartitionKey​(AID aggregateId, long shardCount)
      Resolves the partition key from the aggregate id.
      java.lang.String resolveSortKey​(AID aggregateId, long sequenceNumber)
      Resolves the sort key from the aggregate id and sequence number.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultKeyResolver

        public DefaultKeyResolver()
    • Method Detail

      • resolvePartitionKey

        @Nonnull
        public java.lang.String resolvePartitionKey​(@Nonnull
                                                    AID aggregateId,
                                                    long shardCount)
        Description copied from interface: KeyResolver
        Resolves the partition key from the aggregate id. / 集約IDからパーティションキーを解決します。
        Specified by:
        resolvePartitionKey in interface KeyResolver<AID extends AggregateId>
        Parameters:
        aggregateId - aggregate id / 集約ID
        shardCount - shard count / シャード数
        Returns:
        partition key / パーティションキー
      • resolveSortKey

        @Nonnull
        public java.lang.String resolveSortKey​(@Nonnull
                                               AID aggregateId,
                                               long sequenceNumber)
        Description copied from interface: KeyResolver
        Resolves the sort key from the aggregate id and sequence number. / 集約IDとシーケンス番号からソートキーを解決します。
        Specified by:
        resolveSortKey in interface KeyResolver<AID extends AggregateId>
        Parameters:
        aggregateId - aggregate id / 集約ID
        sequenceNumber - sequence number / シーケンス番号
        Returns:
        sort key / ソートキー