// 
// Decompiled by Procyon v0.6.0
// 

package io.netty.handler.codec.http3;

public interface QpackDecoderStateSyncStrategy
{
    void sectionAcknowledged(final int p0);
    
    boolean entryAdded(final int p0);
    
    default QpackDecoderStateSyncStrategy ackEachInsert() {
        return new QpackDecoderStateSyncStrategy() {
            private int lastCountAcknowledged;
            
            @Override
            public void sectionAcknowledged(final int requiredInsertCount) {
                if (this.lastCountAcknowledged < requiredInsertCount) {
                    this.lastCountAcknowledged = requiredInsertCount;
                }
            }
            
            @Override
            public boolean entryAdded(final int insertCount) {
                if (this.lastCountAcknowledged < insertCount) {
                    this.lastCountAcknowledged = insertCount;
                    return true;
                }
                return false;
            }
        };
    }
}
