1
This commit is contained in:
parent
b13f2fecf1
commit
343c973ecc
@ -15,6 +15,7 @@ type Contract struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ContractTable struct {
|
type ContractTable struct {
|
||||||
|
f5.CustomMetaTable
|
||||||
netIdNameHash *q5.ConcurrentMap[string, *Contract]
|
netIdNameHash *q5.ConcurrentMap[string, *Contract]
|
||||||
netIdAddressHash *q5.ConcurrentMap[string, *Contract]
|
netIdAddressHash *q5.ConcurrentMap[string, *Contract]
|
||||||
}
|
}
|
||||||
@ -31,10 +32,6 @@ func (this *Contract) GetAddress() string {
|
|||||||
return this.address
|
return this.address
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ContractTable) IsNoLoad() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ContractTable) Load() {
|
func (this *ContractTable) Load() {
|
||||||
this.netIdNameHash = new(q5.ConcurrentMap[string, *Contract])
|
this.netIdNameHash = new(q5.ConcurrentMap[string, *Contract])
|
||||||
this.netIdAddressHash = new(q5.ConcurrentMap[string, *Contract])
|
this.netIdAddressHash = new(q5.ConcurrentMap[string, *Contract])
|
||||||
@ -81,18 +78,6 @@ func (this *ContractTable) Load() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ContractTable) PreInit1() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ContractTable) ElementsInit(int) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ContractTable) PostInit1() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ContractTable) GetByNetIdName(netId int32, name string) *Contract {
|
func (this *ContractTable) GetByNetIdName(netId int32, name string) *Contract {
|
||||||
key := fmt.Sprintf("%d_%s", netId, name)
|
key := fmt.Sprintf("%d_%s", netId, name)
|
||||||
if v, ok := this.netIdNameHash.Load(key); ok {
|
if v, ok := this.netIdNameHash.Load(key); ok {
|
||||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit e5653a91a18f5be3c2f63baf257bc57d5d3a74b0
|
Subproject commit c3814ee3afc6ef21c0e7683192044571f561009f
|
Loading…
x
Reference in New Issue
Block a user