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

Experiment with IteratingCallback #12040

Merged
merged 34 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6858307
Experiment with IteratingCallback
gregw Jul 15, 2024
2b60a6d
Experiment with IteratingCallback
gregw Jul 16, 2024
c2742cc
Experiment with IteratingCallback
gregw Jul 16, 2024
4c28464
Reduce capture of this:: on hot path
gregw Jul 16, 2024
a6fa5bf
Split the release operations in case of failures.
sbordet Jul 19, 2024
b56de27
Made onCompleted() private to address PR review.
sbordet Jul 19, 2024
3c7631f
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Jul 24, 2024
c50b4da
Fix
gregw Jul 24, 2024
60ed7d1
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Jul 25, 2024
14d3b08
reverted import changes from bad merge
gregw Jul 25, 2024
3299e02
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Jul 25, 2024
0b547f5
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Aug 3, 2024
5854e11
releaseForRemoval
gregw Aug 3, 2024
92b37b8
improved javadoc
gregw Aug 3, 2024
9d2ae7d
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Aug 4, 2024
703da3d
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Aug 4, 2024
5144e17
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Aug 5, 2024
c00f6f0
WIP
gregw Aug 5, 2024
d3157bf
WIP
gregw Aug 5, 2024
d65bc94
documentation
gregw Aug 5, 2024
700c69b
Merge remote-tracking branch 'origin/experiment/jetty-12.1.x/Iteratin…
gregw Aug 5, 2024
00b87f1
WIP
gregw Aug 6, 2024
e502db0
updates from review
gregw Aug 6, 2024
1530cd6
Fixed FCGI Flusher
gregw Aug 7, 2024
aa42201
Merge branch 'jetty-12.1.x' into experiment/jetty-12.1.x/IteratingCal…
gregw Aug 7, 2024
7c5c003
updates from review
gregw Aug 7, 2024
7f81e62
fix reported leak error messages
lorban Aug 12, 2024
9bce4fc
fix leak
lorban Aug 12, 2024
be283c4
fix missing calls to super
lorban Aug 13, 2024
ddf13d6
Merge remote-tracking branch 'origin/jetty-12.1.x' into experiment/je…
lorban Aug 13, 2024
6028353
Small tweaks to documentation and javadocs.
sbordet Aug 16, 2024
20392d2
Merge remote-tracking branch 'origin/jetty-12.1.x' into experiment/je…
gregw Aug 21, 2024
c19366e
Merge remote-tracking branch 'origin/jetty-12.1.x' into experiment/je…
gregw Aug 22, 2024
86b1442
deflake test
gregw Aug 22, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable failure)
protected void onFailure(Throwable failure)
{
// In case of a failure, either on the
// read or on the write, release the chunk.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
// The iteration completed with a failure.
getEndPoint().close(cause);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
x.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
getEndPoint().close(cause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ else if (expect100)
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
if (chunk != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
super.onCompleteFailure(cause);
super.onFailure(cause);
release();
callback.failed(cause);
}
Expand Down Expand Up @@ -335,7 +335,7 @@ protected Action process() throws Exception
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
release();
callback.failed(cause);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected void onSuccess()
}

@Override
public void onCompleteFailure(Throwable x)
public void onFailure(Throwable x)
{
if (active != null)
active.failed(x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
release();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ protected void onSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
frameInfo.callback.failed(cause);
}
Expand Down Expand Up @@ -673,7 +673,7 @@ protected void onSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
frameInfo.callback.failed(cause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected void onSuccess()
}

@Override
protected void onCompleteFailure(Throwable failure)
protected void onFailure(Throwable failure)
{
if (LOG.isDebugEnabled())
LOG.debug("failed to write {} on {}", entries, this, failure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable failure)
protected void onFailure(Throwable failure)
{
if (LOG.isDebugEnabled())
LOG.debug("failed to write buffers on {}", this, failure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected void onSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
if (LOG.isDebugEnabled())
LOG.debug("failed to write {} on {}", entry, this, cause);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,12 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
if (retainableByteBuffer != null)
retainableByteBuffer.release();
IO.close(channel);
super.onCompleteFailure(x);
super.onFailure(x);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ protected Action process() throws Throwable
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
if (current != null)
{
current.release();
current = Content.Chunk.next(current);
}
ExceptionUtil.callAndThen(x, source::fail, super::onCompleteFailure);
ExceptionUtil.callAndThen(x, source::fail, super::onFailure);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public InvocationType getInvocationType()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
entry.callback.failed(cause);
QuicConnection.this.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable failure)
protected void onFailure(Throwable failure)
{
if (LOG.isDebugEnabled())
LOG.debug("failed to write cipher bytes, closing session on {}", QuicSession.this, failure);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ protected void onSuccess()
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug("Failed to write {} bytes {}", filled, TunnelConnection.this, x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ public GzipBufferCB(boolean complete, Callback callback, ByteBuffer content)
}

@Override
protected void onCompleteFailure(Throwable x)
protected void onFailure(Throwable x)
{
if (_deflaterEntry != null)
{
_deflaterEntry.release();
_deflaterEntry = null;
}
super.onCompleteFailure(x);
super.onFailure(x);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ protected void onCompleteSuccess()
}

@Override
public void onCompleteFailure(final Throwable x)
public void onFailure(final Throwable x)
{
failedCallback(release(), x);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
// There was a write error, close the Gateway Channel.
channel.close(cause);
Expand Down Expand Up @@ -378,7 +378,7 @@ protected void onCompleteSuccess()
}

@Override
protected void onCompleteFailure(Throwable cause)
protected void onFailure(Throwable cause)
{
// There was a write error, close the Gateway Channel.
channel.close(cause);
Expand Down
Loading
Loading