Add AggregateID for the PlayerNotificationEventListener and CommandHandler
This commit is contained in:
@@ -3,5 +3,13 @@ package eventDemo.business.event
|
||||
import eventDemo.business.entity.GameId
|
||||
import eventDemo.business.event.event.GameEvent
|
||||
import eventDemo.libs.event.EventBus
|
||||
import java.util.UUID
|
||||
|
||||
interface GameEventBus : EventBus<GameEvent, GameId>
|
||||
abstract class GameEventBus :
|
||||
EventBus<GameEvent, GameId>,
|
||||
Comparable<GameEventBus> {
|
||||
private val instanceId: UUID = UUID.randomUUID()
|
||||
|
||||
override fun compareTo(other: GameEventBus): Int =
|
||||
compareValues(instanceId, other.instanceId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user