Skip to content

Commit

Permalink
Fix as_performance and app_engine build tags
Browse files Browse the repository at this point in the history
  • Loading branch information
khaf committed May 14, 2024
1 parent d240725 commit 575d8ff
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cdt_map_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !as_performance && !app_engine
// +build !as_performance,!app_engine

// Copyright 2014-2022 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
10 changes: 10 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func (clnt *Client) GetDefaultBatchWritePolicy() *BatchWritePolicy {
return clnt.DefaultBatchWritePolicy
}

// DefaultBatchReadPolicy returns corresponding default policy from the client
func (clnt *Client) GetDefaultBatchReadPolicy() *BatchReadPolicy {
return clnt.DefaultBatchReadPolicy
}

// DefaultBatchDeletePolicy returns corresponding default policy from the client
func (clnt *Client) GetDefaultBatchDeletePolicy() *BatchDeletePolicy {
return clnt.DefaultBatchDeletePolicy
Expand Down Expand Up @@ -187,6 +192,11 @@ func (clnt *Client) SetDefaultBatchWritePolicy(policy *BatchWritePolicy) {
clnt.DefaultBatchWritePolicy = policy
}

// DefaultBatchReadPolicy returns corresponding default policy from the client
func (clnt *Client) SetDefaultBatchReadPolicy(policy *BatchReadPolicy) {
clnt.DefaultBatchReadPolicy = policy
}

// DefaultBatchDeletePolicy returns corresponding default policy from the client
func (clnt *Client) SetDefaultBatchDeletePolicy(policy *BatchDeletePolicy) {
clnt.DefaultBatchDeletePolicy = policy
Expand Down
15 changes: 15 additions & 0 deletions client_ifc_app_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,22 @@ type ClientIfc interface {

// TODO: Synchronization here for the sake of dynamic config in the future

getUsablePolicy(*BasePolicy) *BasePolicy
getUsableWritePolicy(*WritePolicy) *WritePolicy
getUsableScanPolicy(*ScanPolicy) *ScanPolicy
getUsableQueryPolicy(*QueryPolicy) *QueryPolicy
getUsableAdminPolicy(*AdminPolicy) *AdminPolicy
getUsableInfoPolicy(*InfoPolicy) *InfoPolicy

getUsableBatchPolicy(*BatchPolicy) *BatchPolicy
getUsableBatchReadPolicy(*BatchReadPolicy) *BatchReadPolicy
getUsableBatchWritePolicy(*BatchWritePolicy) *BatchWritePolicy
getUsableBatchDeletePolicy(*BatchDeletePolicy) *BatchDeletePolicy
getUsableBatchUDFPolicy(*BatchUDFPolicy) *BatchUDFPolicy

GetDefaultPolicy() *BasePolicy
GetDefaultBatchPolicy() *BatchPolicy
GetDefaultBatchReadPolicy() *BatchReadPolicy
GetDefaultBatchWritePolicy() *BatchWritePolicy
GetDefaultBatchDeletePolicy() *BatchDeletePolicy
GetDefaultBatchUDFPolicy() *BatchUDFPolicy
Expand All @@ -116,6 +130,7 @@ type ClientIfc interface {

SetDefaultPolicy(*BasePolicy)
SetDefaultBatchPolicy(*BatchPolicy)
SetDefaultBatchReadPolicy(*BatchReadPolicy)
SetDefaultBatchWritePolicy(*BatchWritePolicy)
SetDefaultBatchDeletePolicy(*BatchDeletePolicy)
SetDefaultBatchUDFPolicy(*BatchUDFPolicy)
Expand Down
15 changes: 15 additions & 0 deletions client_ifc_as_performance.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,22 @@ type ClientIfc interface {

// TODO: Synchronization here for the sake of dynamic config in the future

getUsablePolicy(*BasePolicy) *BasePolicy
getUsableWritePolicy(*WritePolicy) *WritePolicy
getUsableScanPolicy(*ScanPolicy) *ScanPolicy
getUsableQueryPolicy(*QueryPolicy) *QueryPolicy
getUsableAdminPolicy(*AdminPolicy) *AdminPolicy
getUsableInfoPolicy(*InfoPolicy) *InfoPolicy

getUsableBatchPolicy(*BatchPolicy) *BatchPolicy
getUsableBatchReadPolicy(*BatchReadPolicy) *BatchReadPolicy
getUsableBatchWritePolicy(*BatchWritePolicy) *BatchWritePolicy
getUsableBatchDeletePolicy(*BatchDeletePolicy) *BatchDeletePolicy
getUsableBatchUDFPolicy(*BatchUDFPolicy) *BatchUDFPolicy

GetDefaultPolicy() *BasePolicy
GetDefaultBatchPolicy() *BatchPolicy
GetDefaultBatchReadPolicy() *BatchReadPolicy
GetDefaultBatchWritePolicy() *BatchWritePolicy
GetDefaultBatchDeletePolicy() *BatchDeletePolicy
GetDefaultBatchUDFPolicy() *BatchUDFPolicy
Expand All @@ -116,6 +130,7 @@ type ClientIfc interface {

SetDefaultPolicy(*BasePolicy)
SetDefaultBatchPolicy(*BatchPolicy)
SetDefaultBatchReadPolicy(*BatchReadPolicy)
SetDefaultBatchWritePolicy(*BatchWritePolicy)
SetDefaultBatchDeletePolicy(*BatchDeletePolicy)
SetDefaultBatchUDFPolicy(*BatchUDFPolicy)
Expand Down
4 changes: 2 additions & 2 deletions client_object_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !as_performance
// +build !as_performance
//go:build !as_performance && !app_engine
// +build !as_performance,!app_engine

// Copyright 2014-2022 Aerospike, Inc.
//
Expand Down
10 changes: 10 additions & 0 deletions proxy_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ func (clnt *ProxyClient) GetDefaultBatchWritePolicy() *BatchWritePolicy {
return clnt.DefaultBatchWritePolicy
}

// DefaultBatchReadPolicy returns corresponding default policy from the client
func (clnt *ProxyClient) GetDefaultBatchReadPolicy() *BatchReadPolicy {
return clnt.DefaultBatchReadPolicy
}

// DefaultBatchDeletePolicy returns corresponding default policy from the client
func (clnt *ProxyClient) GetDefaultBatchDeletePolicy() *BatchDeletePolicy {
return clnt.DefaultBatchDeletePolicy
Expand Down Expand Up @@ -196,6 +201,11 @@ func (clnt *ProxyClient) SetDefaultBatchPolicy(policy *BatchPolicy) {
clnt.DefaultBatchPolicy = policy
}

// DefaultBatchReadPolicy returns corresponding default policy from the client
func (clnt *ProxyClient) SetDefaultBatchReadPolicy(policy *BatchReadPolicy) {
clnt.DefaultBatchReadPolicy = policy
}

// DefaultBatchWritePolicy returns corresponding default policy from the client
func (clnt *ProxyClient) SetDefaultBatchWritePolicy(policy *BatchWritePolicy) {
clnt.DefaultBatchWritePolicy = policy
Expand Down
3 changes: 3 additions & 0 deletions udf_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !app_engine
// +build !app_engine

// Copyright 2014-2022 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit 575d8ff

Please sign in to comment.