ChannelFlushPromiseNotifier.java — netty Source File
Architecture documentation for ChannelFlushPromiseNotifier.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you 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:
*
* https://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.
*/
package io.netty.channel;
import io.netty.util.internal.ObjectUtil;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import java.util.ArrayDeque;
import java.util.Queue;
/**
* This implementation allows to register {@link ChannelFuture} instances which will get notified once some amount of
* data was written and so a checkpoint was reached.
*/
public final class ChannelFlushPromiseNotifier {
private long writeCounter;
private final Queue<FlushCheckpoint> flushCheckpoints = new ArrayDeque<FlushCheckpoint>();
private final boolean tryNotify;
/**
* Create a new instance
*
* @param tryNotify if {@code true} the {@link ChannelPromise}s will get notified with
* {@link ChannelPromise#trySuccess()} and {@link ChannelPromise#tryFailure(Throwable)}.
* Otherwise {@link ChannelPromise#setSuccess()} and {@link ChannelPromise#setFailure(Throwable)}
* is used
*/
public ChannelFlushPromiseNotifier(boolean tryNotify) {
this.tryNotify = tryNotify;
}
/**
* Create a new instance which will use {@link ChannelPromise#setSuccess()} and
* {@link ChannelPromise#setFailure(Throwable)} to notify the {@link ChannelPromise}s.
*/
public ChannelFlushPromiseNotifier() {
this(false);
}
/**
* @deprecated use {@link #add(ChannelPromise, long)}
*/
@Deprecated
public ChannelFlushPromiseNotifier add(ChannelPromise promise, int pendingDataSize) {
return add(promise, (long) pendingDataSize);
// ... (214 more lines)
Domain
Subdomains
Types
Source
Frequently Asked Questions
What does ChannelFlushPromiseNotifier.java do?
ChannelFlushPromiseNotifier.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Search subdomain.
Where is ChannelFlushPromiseNotifier.java in the architecture?
ChannelFlushPromiseNotifier.java is located at transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java (domain: Buffer, subdomain: Search, directory: transport/src/main/java/io/netty/channel).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free