T
- type of the returned state handle.public abstract class NonClosingCheckpointOutputStream<T extends StreamStateHandle> extends OutputStream
Modifier and Type | Field and Description |
---|---|
protected CheckpointStateOutputStream |
delegate |
Constructor and Description |
---|
NonClosingCheckpointOutputStream(CheckpointStateOutputStream delegate) |
Modifier and Type | Method and Description |
---|---|
ResourceGuard.Lease |
acquireLease()
Returns a
ResourceGuard.Lease that prevents closing this
stream. |
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected final CheckpointStateOutputStream delegate
public NonClosingCheckpointOutputStream(CheckpointStateOutputStream delegate)
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public final ResourceGuard.Lease acquireLease() throws IOException
ResourceGuard.Lease
that prevents closing this
stream. To allow the system to close this stream, each of the acquired leases need to call
ResourceGuard.Lease.close()
, on their acquired leases.IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.