Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-20426 Sync deprecated methods in the ClientCacheConfiguration #10943

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/_docs/data-rebalancing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,23 @@ tab:C++[unsupported]

== Other Properties

The following table lists the properties of `CacheConfiguration` related to rebalancing:
The following table lists the properties of `IgniteConfiguration` related to rebalancing:

[CAUTION]
====
`rebalanceDelay` and related API's are deprecated and will be removed in the next releases.
`AVAILABLE_PROC_CNT` - Default core size of public thread pool.

====

[cols="1,4,1",opts="header"]
|===
| Property | Description | Default Value
| `rebalanceDelay` | A delay in milliseconds before the rebalancing process starts after a node joins or leaves the topology. Rebalancing delay is useful if you plan to restart nodes or start multiple nodes at once or one after another and don't want to repartition and rebalance the data until all nodes are started.
|0 (no delay)
| `rebalanceThreadPoolSize` |Rebalance thread pool size. Limit of threads used for rebalance. | min(4, max(1, AVAILABLE_PROC_CNT / 4))

|`rebalanceBatchSize` | The size in bytes of a single rebalance message. The rebalancing algorithm splits the data on every node into multiple batches prior to sending it to other nodes. | 512KB

|`rebalanceBatchesPrefetchCnt` | Rebalance batches prefetch count. | 3

|`rebalanceThrottle` | See <<#throttling>>.| 0 (throttling disabled)

| `rebalanceOrder` | The order in which rebalancing should be done. Rebalance order can be set to a non-zero value for caches with SYNC or ASYNC rebalance modes only. Rebalancing for caches with smaller rebalance order is completed first. By default, rebalancing is not ordered. | 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ public final class ClientCacheConfiguration implements Serializable {
/** @serial Group name. */
private String grpName = null;

/** @serial Default lock timeout. */
/**
* @serial Default lock timeout.
* @deprecated Default lock timeout configuration property has no effect.
*/
@Deprecated
private long dfltLockTimeout = CacheConfiguration.DFLT_LOCK_TIMEOUT;

/** @serial Partition loss policy. */
Expand All @@ -63,9 +67,11 @@ public final class ClientCacheConfiguration implements Serializable {
private boolean readFromBackup = CacheConfiguration.DFLT_READ_FROM_BACKUP;

/** @serial Rebalance batch size. */
@Deprecated
private int rebalanceBatchSize = IgniteConfiguration.DFLT_REBALANCE_BATCH_SIZE;

/** @serial Rebalance batches prefetch count. */
@Deprecated
private long rebalanceBatchesPrefetchCnt = IgniteConfiguration.DFLT_REBALANCE_BATCHES_PREFETCH_COUNT;

/** @serial Rebalance delay. */
Expand All @@ -78,9 +84,11 @@ public final class ClientCacheConfiguration implements Serializable {
private int rebalanceOrder = 0;

/** @serial Rebalance throttle. */
@Deprecated
private long rebalanceThrottle = IgniteConfiguration.DFLT_REBALANCE_THROTTLE;

/** @serial @serial Rebalance timeout. */
/** @serial Rebalance timeout. */
@Deprecated
private long rebalanceTimeout = IgniteConfiguration.DFLT_REBALANCE_TIMEOUT;

/** @serial Write synchronization mode. */
Expand Down Expand Up @@ -287,15 +295,19 @@ public ClientCacheConfiguration setGroupName(String newVal) {

/**
* @return Default lock acquisition timeout. {@code 0} and means that lock acquisition will never timeout.
* @deprecated Default lock timeout configuration property has no effect.
*/
@Deprecated
public long getDefaultLockTimeout() {
return dfltLockTimeout;
}

/**
* @param dfltLockTimeout Default lock timeout.
* @return {@code this} for chaining.
* @deprecated Default lock timeout configuration property has no effect.
*/
@Deprecated
public ClientCacheConfiguration setDefaultLockTimeout(long dfltLockTimeout) {
this.dfltLockTimeout = dfltLockTimeout;

Expand Down Expand Up @@ -342,15 +354,20 @@ public ClientCacheConfiguration setReadFromBackup(boolean readFromBackup) {
* @return Size (in number bytes) to be loaded within a single rebalance message.
* Rebalancing algorithm will split total data set on every node into multiple
* batches prior to sending data.
*
* @deprecated Use {@link IgniteConfiguration#getRebalanceBatchSize()} instead.
*/
@Deprecated
public int getRebalanceBatchSize() {
return rebalanceBatchSize;
}

/**
* @param rebalanceBatchSize Rebalance batch size.
* @return {@code this} for chaining.
* @deprecated Use {@link IgniteConfiguration#setRebalanceBatchSize(int)} instead.
*/
@Deprecated
public ClientCacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize) {
this.rebalanceBatchSize = rebalanceBatchSize;

Expand All @@ -363,15 +380,20 @@ public ClientCacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize) {
*
* @return Number of batches generated by supply node at rebalancing start.
* Minimum is 1.
*
* @deprecated Use {@link IgniteConfiguration#getRebalanceBatchesPrefetchCount()} instead
*/
@Deprecated
public long getRebalanceBatchesPrefetchCount() {
return rebalanceBatchesPrefetchCnt;
}

/**
* @param rebalanceBatchesPrefetchCnt Rebalance batches prefetch count.
* @return {@code this} for chaining.
* @deprecated Use {@link IgniteConfiguration#getRebalanceBatchesPrefetchCount()} instead
*/
@Deprecated
public ClientCacheConfiguration setRebalanceBatchesPrefetchCount(long rebalanceBatchesPrefetchCnt) {
this.rebalanceBatchesPrefetchCnt = rebalanceBatchesPrefetchCnt;

Expand All @@ -388,15 +410,20 @@ public ClientCacheConfiguration setRebalanceBatchesPrefetchCount(long rebalanceB
* immediately upon node leaving topology. If {@code -1} is returned, then rebalancing
* will only be started manually.
* </p>
*
* @deprecated Use baseline topology feature instead. Please, be aware this API will be removed in the next releases.
*/
@Deprecated
public long getRebalanceDelay() {
return rebalanceDelay;
}

/**
* @param rebalanceDelay Rebalance delay.
* @return {@code this} for chaining.
* @deprecated Use baseline topology feature instead. Please, be aware this API will be removed in the next releases.
*/
@Deprecated
public ClientCacheConfiguration setRebalanceDelay(long rebalanceDelay) {
this.rebalanceDelay = rebalanceDelay;

Expand Down Expand Up @@ -458,15 +485,20 @@ public ClientCacheConfiguration setRebalanceOrder(int rebalanceOrder) {
* <p>
* Default value of {@code 0} means that throttling is disabled.
* </p>
*
* @deprecated Use {@link IgniteConfiguration#getRebalanceThrottle()} instead.
*/
@Deprecated
public long getRebalanceThrottle() {
return rebalanceThrottle;
}

/**
* @param newVal Rebalance throttle.
* @return {@code this} for chaining.
* @deprecated Use {@link IgniteConfiguration#setRebalanceThrottle(long)} instead.
*/
@Deprecated
public ClientCacheConfiguration setRebalanceThrottle(long newVal) {
rebalanceThrottle = newVal;

Expand All @@ -475,15 +507,19 @@ public ClientCacheConfiguration setRebalanceThrottle(long newVal) {

/**
* @return Rebalance timeout (ms).
* @deprecated Use {@link IgniteConfiguration#getRebalanceTimeout()} instead.
*/
@Deprecated
public long getRebalanceTimeout() {
return rebalanceTimeout;
}

/**
* @param newVal Rebalance timeout.
* @return {@code this} for chaining.
* @deprecated Use {@link IgniteConfiguration#getRebalanceTimeout()} instead.
*/
@Deprecated
public ClientCacheConfiguration setRebalanceTimeout(long newVal) {
rebalanceTimeout = newVal;

Expand Down