public class LocalFilePluginStore extends Object implements PluginStore
Constructor and Description |
---|
LocalFilePluginStore() |
Modifier and Type | Method and Description |
---|---|
void |
deleteResource(Account account,
ResourceType type,
String name,
int version)
Delete a plugin resource.
|
InputStream |
getResourceInputStream(Account account,
ResourceType type,
String name,
int version)
Get an input stream for reading a plugin resource.
|
OutputStream |
getResourceOutputStream(Account account,
ResourceType type,
String name,
int version)
Get an output stream for the given resource.
|
void |
initialize(Configuration conf)
Initialize the store.
|
public void initialize(Configuration conf)
PluginStore
initialize
in interface PluginStore
conf
- Configuration for initializing the storepublic OutputStream getResourceOutputStream(Account account, ResourceType type, String name, int version) throws IOException
getResourceOutputStream
in interface PluginStore
account
- Account that owns the plugin resourcetype
- Type of resourcename
- Name of the resource being writtenversion
- Version of the resource being writtenIOException
- if there was an error creating the filepublic InputStream getResourceInputStream(Account account, ResourceType type, String name, int version) throws IOException
PluginStore
getResourceInputStream
in interface PluginStore
account
- Account that owns the plugin resourcetype
- Type of resource to getname
- Name of the resource to getversion
- Version of the resource to getIOException
- if there is an error getting the input streampublic void deleteResource(Account account, ResourceType type, String name, int version) throws IOException
PluginStore
deleteResource
in interface PluginStore
account
- Account that owns the plugin resourcetype
- Type of resource to deletename
- Name of the resource to deleteversion
- Version of the resource to deleteIOException
- if there was an error deleting the resourceCopyright © 2013-2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.