Skip to content

Commit

Permalink
move partial buffer tracking to net_01 (#225)
Browse files Browse the repository at this point in the history
* move partial buffer tracking to net_01

* Update net_01 to 2.0.0

---------

Co-authored-by: StrongestNumber9 <16169054+StrongestNumber9@users.noreply.github.com>
  • Loading branch information
kortemik and StrongestNumber9 authored Oct 17, 2024
1 parent a55fedf commit 09402ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<dependency>
<groupId>com.teragrep</groupId>
<artifactId>net_01</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
</dependency>
<!-- slf4j -->
<dependency>
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/com/teragrep/rlp_03/frame/FrameDelegationClock.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,12 @@ public void advance(BufferLease bufferLease) {
LOGGER.debug("submitting bufferLease id <{}>", bufferLease.id());
RelpFrame relpFrame = frameClockLeaseful.submit(bufferLease);

if (bufferLease.buffer().hasRemaining()) { // TODO should this even be responsibility of a Clock, probably not?
bufferLease.addRef(); // a shared buffer
}
LOGGER.debug("bufferLease id <{}> hasRemaining <{}>", bufferLease.id(), bufferLease.buffer().remaining());

boolean interested;
if (relpFrame.isStub()) {
interested = true;
}
else {
LOGGER
.debug(
"bufferLease id <{}> before delegate hasRemaining <{}>", bufferLease.id(),
bufferLease.buffer().hasRemaining()
);
interested = delegateFrame(relpFrame);
LOGGER
.debug(
"bufferLease id <{}> after delegate isTerminated <{}>", bufferLease.id(),
bufferLease.isTerminated()
);
}

LOGGER.debug("bufferLease id <{}> isTerminated <{}>", bufferLease.id(), bufferLease.isTerminated());
Expand Down

0 comments on commit 09402ff

Please sign in to comment.