Skip to content

Commit

Permalink
Merge #3276 into 1.2.0-M3
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Jun 10, 2024
2 parents bcdf322 + 3083c45 commit 2bf1db7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2023 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2011-2024 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -198,6 +198,11 @@ public final class ReactorNetty {
*/
public static final ZoneId ZONE_ID_SYSTEM = ZoneId.systemDefault();

/**
* Default prefetch size ({@link Subscription#request(long)}) for data stream Publisher, fallback to 128.
*/
public static final String REACTOR_NETTY_SEND_MAX_PREFETCH_SIZE = "reactor.netty.send.maxPrefetchSize";

/**
* Try to call {@link ReferenceCounted#release()} if the specified message implements {@link ReferenceCounted}.
* If the specified message doesn't implement {@link ReferenceCounted} or it is already released,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2019-2024 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,7 +58,8 @@ static <O> ToIntFunction<O> defaultSizeOf() {
return (ToIntFunction) SIZE_OF;
}

static final int MAX_SIZE = 128;
static final int MAX_SIZE =
Integer.parseInt(System.getProperty(ReactorNetty.REACTOR_NETTY_SEND_MAX_PREFETCH_SIZE, "128"));

static final int REFILL_SIZE = MAX_SIZE / 2;

Expand Down

0 comments on commit 2bf1db7

Please sign in to comment.