forked from deephaven/deephaven-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup and improve some logging code. (deephaven#4065)
Improved as part of the investigation into deephaven#4051
- Loading branch information
1 parent
aee97fd
commit 97c492b
Showing
13 changed files
with
154 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
IO/src/main/java/io/deephaven/io/log/LogBufferPoolLenientImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending | ||
*/ | ||
package io.deephaven.io.log; | ||
|
||
import io.deephaven.base.pool.ThreadSafeLenientFixedSizePool; | ||
|
||
import java.nio.ByteBuffer; | ||
|
||
class LogBufferPoolLenientImpl extends ThreadSafeLenientFixedSizePool<ByteBuffer> implements LogBufferPool { | ||
|
||
private final int bufferSize; | ||
|
||
public LogBufferPoolLenientImpl(int bufferCount, final int bufferSize) { | ||
super(bufferCount, () -> ByteBuffer.allocate(bufferSize), ByteBuffer::clear); | ||
this.bufferSize = bufferSize; | ||
|
||
} | ||
|
||
@Override | ||
public ByteBuffer take(int minSize) { | ||
if (minSize > bufferSize) { | ||
throw new UnsupportedOperationException("Not Implemented Yet"); | ||
} | ||
return take(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.