public class JdbcFileEntrySettings extends Object
Holds the FILE_ENTRY_HANDLER_TYPE
that defines the type of the
FileEntryHandler
that will be created
and initialized with the settings.
Default values for a new instance are: FileEntryHandler
for
the FILE_ENTRY_HANDLER_TYPE
setting, FetchOnBufferReadJdbcIndexInput
for the
INDEX_INPUT_TYPE_SETTING
setting, and RAMAndFileJdbcIndexOutput
for the
INDEX_OUTPUT_TYPE_SETTING
setting.
Modifier and Type | Field and Description |
---|---|
static String |
FILE_ENTRY_HANDLER_TYPE
The class name of the
FileEntryHandler . |
static String |
INDEX_INPUT_TYPE_SETTING
The class name of the
IndexInput . |
static String |
INDEX_OUTPUT_TYPE_SETTING
The class name of the
IndexOutput . |
Constructor and Description |
---|
JdbcFileEntrySettings()
Creates a new file entry settings, and intialize it to default values.
|
Modifier and Type | Method and Description |
---|---|
Properties |
getProperties()
Returns the inner java properties.
|
String |
getSetting(String setting)
Returns the value match for the given setting.
|
String |
getSetting(String setting,
String defaultValue)
Returns the value that matches the given setting.
|
boolean |
getSettingAsBoolean(String setting,
boolean defaultValue)
Returns the boolean value that matches the given setting.
|
Class |
getSettingAsClass(String setting,
Class defaultValue)
Returns the class value that matches the given setting.
|
Class |
getSettingAsClass(String setting,
Class defaultValue,
ClassLoader classLoader)
Returns the class value that matches the given setting.
|
float |
getSettingAsFloat(String setting,
float defaultValue)
Returns the float value that matches the given setting.
|
int |
getSettingAsInt(String setting,
int defaultValue)
Returns the int value that matches the given setting.
|
long |
getSettingAsLong(String setting,
long defaultValue)
Returns the long value that matches the given setting.
|
JdbcFileEntrySettings |
setBooleanSetting(String setting,
boolean value) |
JdbcFileEntrySettings |
setClassSetting(String setting,
Class clazz) |
JdbcFileEntrySettings |
setFloatSetting(String setting,
float value) |
JdbcFileEntrySettings |
setIntSetting(String setting,
int value) |
JdbcFileEntrySettings |
setLongSetting(String setting,
long value) |
JdbcFileEntrySettings |
setSetting(String setting,
String value) |
public static final String FILE_ENTRY_HANDLER_TYPE
FileEntryHandler
.public static final String INDEX_INPUT_TYPE_SETTING
IndexInput
. Only applies
to FileEntryHandler
s that use it.public static final String INDEX_OUTPUT_TYPE_SETTING
IndexOutput
. Only applies
to FileEntryHandler
s that use it.public JdbcFileEntrySettings()
public Properties getProperties()
public String getSetting(String setting)
null
if no
setting is found.setting
- The setting namenull
if none is foundpublic String getSetting(String setting, String defaultValue)
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundpublic boolean getSettingAsBoolean(String setting, boolean defaultValue)
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundpublic Class getSettingAsClass(String setting, Class defaultValue) throws ClassNotFoundException
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundClassNotFoundException
public Class getSettingAsClass(String setting, Class defaultValue, ClassLoader classLoader) throws ClassNotFoundException
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundclassLoader
- The class loader to be used to load the classClassNotFoundException
public float getSettingAsFloat(String setting, float defaultValue)
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundpublic int getSettingAsInt(String setting, int defaultValue)
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundpublic long getSettingAsLong(String setting, long defaultValue)
setting
- The setting namedefaultValue
- The default value to be used if no setting is foundpublic JdbcFileEntrySettings setBooleanSetting(String setting, boolean value)
public JdbcFileEntrySettings setClassSetting(String setting, Class clazz)
public JdbcFileEntrySettings setFloatSetting(String setting, float value)
public JdbcFileEntrySettings setIntSetting(String setting, int value)
public JdbcFileEntrySettings setLongSetting(String setting, long value)
public JdbcFileEntrySettings setSetting(String setting, String value)
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.