Updated text names for idle strategies
This commit is contained in:
parent
daec762e30
commit
ad3fdfc64d
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2023 dorkbox, llc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2014-2020 Real Logic Limited.
|
||||
*
|
||||
@ -206,17 +222,17 @@ class CoroutineBackoffIdleStrategy : BackoffIdleStrategyData, CoroutineIdleStrat
|
||||
/**
|
||||
* Name to be returned from [.alias].
|
||||
*/
|
||||
const val ALIAS = "backoff"
|
||||
const val ALIAS = "coroutine-backoff"
|
||||
|
||||
/**
|
||||
* Default number of times the strategy will spin without work before going to next state.
|
||||
*/
|
||||
const val DEFAULT_MAX_SPINS = 10L
|
||||
const val DEFAULT_MAX_SPINS = 1000L
|
||||
|
||||
/**
|
||||
* Default number of times the strategy will yield without work before going to next state.
|
||||
*/
|
||||
const val DEFAULT_MAX_YIELDS = 5L
|
||||
const val DEFAULT_MAX_YIELDS = 1000L
|
||||
|
||||
/**
|
||||
* Default interval the strategy will park the thread on entering the park state in milliseconds.
|
||||
@ -226,7 +242,7 @@ class CoroutineBackoffIdleStrategy : BackoffIdleStrategyData, CoroutineIdleStrat
|
||||
/**
|
||||
* Default interval the strategy will park the thread will expand interval to as a max in milliseconds.
|
||||
*/
|
||||
const val DEFAULT_MAX_PARK_PERIOD_MS = 1000L
|
||||
const val DEFAULT_MAX_PARK_PERIOD_MS = 4L
|
||||
}
|
||||
|
||||
/**
|
||||
@ -368,7 +384,7 @@ class CoroutineBackoffIdleStrategy : BackoffIdleStrategyData, CoroutineIdleStrat
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "BackoffIdleStrategy{" +
|
||||
return "CoroutineBackoffIdleStrategy{" +
|
||||
"alias=" + ALIAS +
|
||||
", maxSpins=" + maxSpins +
|
||||
", maxYields=" + maxYields +
|
||||
@ -376,6 +392,4 @@ class CoroutineBackoffIdleStrategy : BackoffIdleStrategyData, CoroutineIdleStrat
|
||||
", maxParkPeriodMs=" + maxParkPeriodMs +
|
||||
'}'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class CoroutineBusySpinIdleStrategy : CoroutineIdleStrategy {
|
||||
|
||||
override fun reset() {}
|
||||
override fun alias(): String {
|
||||
return "spin"
|
||||
return "coroutine-spin"
|
||||
}
|
||||
|
||||
override fun clone(): CoroutineIdleStrategy {
|
||||
|
@ -43,7 +43,7 @@ class CoroutineNoOpIdleStrategy : CoroutineIdleStrategy {
|
||||
/**
|
||||
* Name to be returned from [.alias].
|
||||
*/
|
||||
const val ALIAS = "noop"
|
||||
const val ALIAS = "coroutine-noop"
|
||||
|
||||
/**
|
||||
* As there is no instance state then this object can be used to save on allocation.
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2023 dorkbox, llc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2014-2020 Real Logic Limited.
|
||||
*
|
||||
@ -29,7 +45,7 @@ class CoroutineSleepingMillisIdleStrategy : CoroutineIdleStrategy {
|
||||
/**
|
||||
* Name to be returned from [.alias].
|
||||
*/
|
||||
const val ALIAS = "sleep-ms"
|
||||
const val ALIAS = "coroutine-sleep-ms"
|
||||
|
||||
/**
|
||||
* Default sleep period when the default constructor is used.
|
||||
@ -100,7 +116,7 @@ class CoroutineSleepingMillisIdleStrategy : CoroutineIdleStrategy {
|
||||
|
||||
|
||||
override fun toString(): String {
|
||||
return "SleepingMillisIdleStrategy{" +
|
||||
return "CoroutineSleepingMillisIdleStrategy{" +
|
||||
"alias=" + ALIAS +
|
||||
", sleepPeriodMs=" + sleepPeriodMs +
|
||||
'}'
|
||||
|
@ -42,7 +42,7 @@ class CoroutineYieldingIdleStrategy : CoroutineIdleStrategy {
|
||||
/**
|
||||
* Name to be returned from [.alias].
|
||||
*/
|
||||
const val ALIAS = "yield"
|
||||
const val ALIAS = "coroutine-yield"
|
||||
|
||||
/**
|
||||
* As there is no instance state then this object can be used to save on allocation.
|
||||
|
Loading…
Reference in New Issue
Block a user