Skip to content

Commit

Permalink
+ removed writer level buffer
Browse files Browse the repository at this point in the history
+ added front and back buffer capacities configurations on entire service level
  • Loading branch information
q3769 committed May 1, 2023
1 parent 0ea5982 commit 9dce75e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
/**
*
*/
public class BufferringWriterThread implements WriterThread {
public class BufferingWriterThread implements WriterThread {
private static final int DEFAULT_FRONT_BUFFER_CAPACITY = 256;
private final ExecutorService executorService;

/**
* @param bufferCapacity
* async work queue capacity for log entry tasks
*/
public BufferringWriterThread(int bufferCapacity) {
public BufferingWriterThread(int bufferCapacity) {
this.executorService = new ThreadPoolExecutor(1,
1,
0L,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import elf4j.Level;
import elf4j.engine.NativeLogger;
import elf4j.engine.service.BufferringWriterThread;
import elf4j.engine.service.BufferingWriterThread;
import elf4j.engine.service.LogServiceManager;
import elf4j.engine.service.WriterThread;
import elf4j.engine.service.writer.BufferedStandardOutput;
Expand Down Expand Up @@ -118,7 +118,7 @@ private void parseConfigurations(@Nullable Properties properties) {
this.callerLevelRepository = CallerLevelRepository.from(properties);
this.writerRepository = WriterRepository.from(properties);
this.writerThread =
new BufferringWriterThread(Integer.parseInt(properties.getProperty("buffer.front", UNDEFINED_INT)
new BufferingWriterThread(Integer.parseInt(properties.getProperty("buffer.front", UNDEFINED_INT)
.replace("_", "")
.replace(",", "")));
this.standardOutputBufferCapacity =
Expand Down

0 comments on commit 9dce75e

Please sign in to comment.