@InterfaceAudience.Private class LazyInitializedWALProvider extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
private Abortable |
abortable |
private WALFactory |
factory |
private AtomicReference<WALProvider> |
holder |
private String |
providerConfigName |
private String |
providerId |
Constructor and Description |
---|
LazyInitializedWALProvider(WALFactory factory,
String providerId,
String providerConfigName,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
(package private) WALProvider |
getProvider() |
(package private) WALProvider |
getProviderNoCreate()
Get the provider if it already initialized, otherwise just return
null instead of
creating it. |
(package private) void |
shutdown() |
private final WALFactory factory
private final String providerId
private final String providerConfigName
private final AtomicReference<WALProvider> holder
LazyInitializedWALProvider(WALFactory factory, String providerId, String providerConfigName, Abortable abortable)
WALProvider getProvider() throws IOException
IOException
WALProvider getProviderNoCreate()
null
instead of
creating it.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
void shutdown() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.