public class PluginHandle extends Object
StoragePlugin. Storage plugins are created lazily to avoid
long Drillbit start times. Plugin creation is synchronized as is closing.
A handle has a type used to determine which operations are allowed on the handle. For example, inrinsic (system) plugins cannot be deleted or disabled.
| Constructor and Description |
|---|
PluginHandle(StoragePlugin plugin,
ConnectorHandle connector,
org.apache.drill.exec.store.PluginHandle.PluginType type) |
PluginHandle(String name,
StoragePluginConfig config,
ConnectorHandle connector) |
PluginHandle(String name,
StoragePluginConfig config,
ConnectorHandle connector,
org.apache.drill.exec.store.PluginHandle.PluginType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the plugin.
|
StoragePluginConfig |
config() |
boolean |
hasInstance() |
boolean |
isIntrinsic() |
boolean |
isStored() |
String |
name() |
StoragePlugin |
plugin()
Retrieve the storage plugin instance, creating it if needed.
|
String |
toString() |
PluginHandle |
transfer(org.apache.drill.exec.store.PluginHandle.PluginType type)
Atomically transfer the plugin instance, if any, to a new handle
of the given type.
|
public PluginHandle(String name, StoragePluginConfig config, ConnectorHandle connector)
public PluginHandle(String name, StoragePluginConfig config, ConnectorHandle connector, org.apache.drill.exec.store.PluginHandle.PluginType type)
public PluginHandle(StoragePlugin plugin, ConnectorHandle connector, org.apache.drill.exec.store.PluginHandle.PluginType type)
public String name()
public StoragePluginConfig config()
public boolean isStored()
public boolean isIntrinsic()
public StoragePlugin plugin()
context - the context to use for creating a new instance, if neededUserException - if the storage plugin creation failed due to class errors
(unlikely) or external system errors (more likely)public boolean hasInstance()
public void close()
public PluginHandle transfer(org.apache.drill.exec.store.PluginHandle.PluginType type)
By definition, a plugin becomes disabled if it moves to ephemeral, enabled if it moves from ephemeral into stored status.
Copyright © 2021 The Apache Software Foundation. All rights reserved.