Package ch.qos.logback.core.recovery
Class ResilientOutputStreamBase
java.lang.Object
java.io.OutputStream
ch.qos.logback.core.recovery.ResilientOutputStreamBase
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
ResilientFileOutputStream
,ResilientSyslogOutputStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Context
private int
protected OutputStream
protected boolean
private RecoveryCoordinator
(package private) static final int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
(package private) void
(package private) void
void
close()
void
flush()
(package private) abstract String
private boolean
(package private) abstract OutputStream
void
private void
void
setContext
(Context context) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
write
-
Field Details
-
STATUS_COUNT_LIMIT
static final int STATUS_COUNT_LIMIT- See Also:
-
noContextWarning
private int noContextWarning -
statusCount
private int statusCount -
context
-
recoveryCoordinator
-
os
-
presumedClean
protected boolean presumedClean
-
-
Constructor Details
-
ResilientOutputStreamBase
public ResilientOutputStreamBase()
-
-
Method Details
-
isPresumedInError
private boolean isPresumedInError() -
write
public void write(byte[] b, int off, int len) - Overrides:
write
in classOutputStream
-
write
public void write(int b) - Specified by:
write
in classOutputStream
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
-
getDescription
-
openNewOutputStream
- Throws:
IOException
-
postSuccessfulWrite
private void postSuccessfulWrite() -
postIOFailure
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
attemptRecovery
void attemptRecovery() -
addStatusIfCountNotOverLimit
-
addStatus
-
getContext
-
setContext
-