Skip to content

Commit 78796fa

Browse files
committed
Documentation update.
1 parent 59e6f7f commit 78796fa

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/main/java/pl/mjaron/tinyloki/JsonLogStream.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ public void clear() {
9393

9494
/**
9595
* Provide stream data and clear old logs.
96+
* <p>
97+
* Not thread safe.
98+
* <p>
99+
* For internal use only.
100+
* <p>
101+
* Called internally by {@link JsonLogCollector} in thread managed by {@link IExecutor}.
96102
*
97-
* @return JSON-formatted String containing single stream logs from last syncAnd operation or from beginning of time.
103+
* @return JSON String containing single stream logs from last syncAnd operation or from beginning of time.
98104
* Null if this stream is empty.
99105
*/
100106
public String flush() {

src/main/java/pl/mjaron/tinyloki/TinyLoki.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,17 @@ protected void internalProcessLogs() throws InterruptedException {
489489
}
490490

491491
/**
492-
* Requests the executor (worker thread) to stop ASAP. Not synchronized logs are dropped.
492+
* Requests the executor (worker thread) to stop ASAP.
493+
* <p>
494+
* Buffered but not sent logs are dropped.
495+
* <p>
496+
* <b>Thread safety</b><br/>
497+
* It may be called from any thread.
493498
*
494499
* @return This reference.
495500
* @since 1.0.0
496501
*/
497-
synchronized public TinyLoki stopAsync() {
502+
public TinyLoki stopAsync() {
498503
executor.stopAsync();
499504
return this;
500505
}

0 commit comments

Comments
 (0)