mirror of
https://github.com/tursom/TursomServer.git
synced 2025-03-13 11:20:10 +08:00
add Context
This commit is contained in:
parent
00baa0c063
commit
b8b63acb48
@ -3,4 +3,18 @@ package cn.tursom.core.context
|
||||
data class ContextKey<T>(
|
||||
val envId: Int,
|
||||
val id: Int,
|
||||
)
|
||||
) {
|
||||
override fun hashCode(): Int {
|
||||
return id
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is ContextKey<*>) return false
|
||||
|
||||
if (envId != other.envId) return false
|
||||
if (id != other.id) return false
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user