public class Database
extends java.lang.Object
implements java.io.Closeable
Database attributes are specified in the DatabaseConfig
class. Database handles are
free-threaded and may be used concurrently by multiple threads.
To open an existing database with default attributes:
Environment env = new Environment(home, null); Database myDatabase = env.openDatabase(null, "mydatabase", null);
To create a transactional database that supports duplicates:
DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setTransactional(true); dbConfig.setAllowCreate(true); dbConfig.setSortedDuplicates(true); Database db = env.openDatabase(txn, "mydatabase", dbConfig);
Modifier and Type | Method and Description |
---|---|
void |
close()
Discards the database handle.
|
int |
compareDuplicates(DatabaseEntry entry1,
DatabaseEntry entry2)
Compares two data elements using either the default comparator if no
duplicate comparator has been set or the duplicate comparator if one has
been set.
|
int |
compareKeys(DatabaseEntry entry1,
DatabaseEntry entry2)
Compares two keys using either the default comparator if no BTree
comparator has been set or the BTree comparator if one has been set.
|
long |
count()
Counts the key/data pairs in the database.
|
long |
count(long memoryLimit)
Counts the key/data pairs in the database.
|
OperationStatus |
delete(Transaction txn,
DatabaseEntry key)
Removes records with a given key from the database.
|
OperationResult |
delete(Transaction txn,
DatabaseEntry key,
WriteOptions options)
Removes records with a given key from the database.
|
OperationResult |
get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
Get getType,
ReadOptions options)
Retrieves a record according to the specified
Get type. |
OperationStatus |
get(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key.
|
DatabaseConfig |
getConfig()
Returns this Database object's configuration.
|
java.lang.String |
getDatabaseName()
Returns the database name.
|
Environment |
getEnvironment()
Returns the
Environment handle for
the database environment underlying the Database . |
OperationStatus |
getSearchBoth(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Retrieves the key/data pair with the given key and data value, that is,
both the key and data items must match.
|
java.util.List<SecondaryDatabase> |
getSecondaryDatabases()
Returns a list of all
SecondaryDatabase objects associated with a primary database. |
DatabaseStats |
getStats(StatsConfig config)
Returns database statistics.
|
JoinCursor |
join(Cursor[] cursors,
JoinConfig config)
Creates a specialized join cursor for use in performing equality or
natural joins on secondary indices.
|
DiskOrderedCursor |
openCursor(DiskOrderedCursorConfig cursorConfig)
Create a DiskOrderedCursor to iterate over the records in 'this'
Database.
|
Cursor |
openCursor(Transaction txn,
CursorConfig cursorConfig)
Returns a cursor into the database.
|
Sequence |
openSequence(Transaction txn,
DatabaseEntry key,
SequenceConfig config)
Opens a sequence in the database.
|
void |
preload(long maxBytes)
Deprecated.
As of JE 2.0.83, replaced by
preload(PreloadConfig) . |
void |
preload(long maxBytes,
long maxMillisecs)
Deprecated.
As of JE 2.0.101, replaced by
preload(PreloadConfig) . |
PreloadStats |
preload(PreloadConfig config)
Preloads the cache.
|
OperationStatus |
put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Stores the key/data pair into the database.
|
OperationResult |
put(Transaction txn,
DatabaseEntry key,
DatabaseEntry data,
Put putType,
WriteOptions options)
Inserts or updates a record according to the specified
Put
type. |
OperationStatus |
putNoDupData(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Stores the key/data pair into the database if it does not already appear
in the database.
|
OperationStatus |
putNoOverwrite(Transaction txn,
DatabaseEntry key,
DatabaseEntry data)
Stores the key/data pair into the database if the key does not already
appear in the database.
|
void |
removeSequence(Transaction txn,
DatabaseEntry key)
Removes the sequence from the database.
|
void |
sync()
Flushes any cached information for this database to disk; only
applicable for deferred-write databases.
|
DatabaseStats |
verify(VerifyConfig config)
Verifies the integrity of the database.
|
public void close()
When closing the last open handle for a deferred-write database, any
cached database information is flushed to disk as if sync()
were
called.
The database handle should not be closed while any other handle that
refers to it is not yet closed; for example, database handles should not
be closed while cursor handles into the database remain open, or
transactions that include operations on the database have not yet been
committed or aborted. Specifically, this includes Cursor
and Transaction
handles.
When multiple threads are using the Database
handle concurrently, only a single thread may call this
method.
When called on a database that is the primary database for a secondary index, the primary database should be closed only after all secondary indices which reference it have been closed.
The database handle may not be accessed again after this method is
called, regardless of the method's success or failure, with one
exception: the close
method itself may be called any number of
times.
WARNING: To guard against memory leaks, the application should discard all references to the closed handle. While BDB makes an effort to discard references from closed objects to the allocated memory for an environment, this behavior is not guaranteed. The safe course of action for an application is to discard all references to closed BDB objects.
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if cursors associated with this database
are still open.DatabaseConfig.setDeferredWrite
public void sync()
Note that deferred-write databases are automatically flushed to disk
when the close()
method is called.
DatabasePreemptedException
- in a replicated
environment if the master has truncated, removed or renamed the
database.OperationFailureException
- if this exception occurred earlier and
caused the transaction to be invalidated.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this is not a deferred-write
database, or this database is read-only.java.lang.IllegalStateException
- if the database has been closed.DatabaseConfig.setDeferredWrite
public Sequence openSequence(Transaction txn, DatabaseEntry key, SequenceConfig config)
txn
- For a transactional database, an explicit transaction may
be specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- The key DatabaseEntry
of the sequence.config
- The sequence attributes. If null, default attributes are
used.SequenceExistsException
- if the sequence record already exists
and the SequenceConfig ExclusiveCreate
parameter is true.SequenceNotFoundException
- if the sequence record does not exist
and the SequenceConfig AllowCreate
parameter is false.OperationFailureException
- if one of the Read Operation
Failures occurs. If the sequence does not exist and the AllowCreate
parameter is true, then one
of the Write
Operation Failures may also occur.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is read-only, or
this database is configured for duplicates.java.lang.IllegalStateException
- if the Sequence record is deleted by
another thread during this method invocation, or the database has been
closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified,
for example, an invalid SequenceConfig
parameter.public void removeSequence(Transaction txn, DatabaseEntry key)
txn
- For a transactional database, an explicit transaction may be
specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- The key DatabaseEntry
of the sequence.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is read-only.public Cursor openCursor(Transaction txn, CursorConfig cursorConfig)
txn
- the transaction used to protect all operations performed with
the cursor, or null if the operations should not be transaction
protected. If the database is non-transactional, null must be
specified. For a transactional database, the transaction is optional
for read-only access and required for read-write access.cursorConfig
- The cursor attributes. If null, default attributes
are used.DatabasePreemptedException
- in a replicated
environment if the master has truncated, removed or renamed the
database.OperationFailureException
- if this exception occurred earlier and
caused the transaction to be invalidated.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified,
for example, an invalid CursorConfig
parameter.public DiskOrderedCursor openCursor(DiskOrderedCursorConfig cursorConfig)
See DiskOrderedCursor
for more details and a description of the
consistency guarantees provided by the scan.
WARNING: After calling this method, deletion of log files by
the JE log cleaner will be disabled until DiskOrderedCursor.close()
is called. To prevent unbounded growth of
disk usage, be sure to call DiskOrderedCursor.close()
to
re-enable log file deletion.
public OperationResult delete(Transaction txn, DatabaseEntry key, WriteOptions options)
txn
- For a transactional database, an explicit transaction may
be specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- the key used as
input.options
- the WriteOptions, or null to use default options.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is read-only.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.
This includes passing a null input key parameter, an input key parameter
with a null data array, or a partial key input parameter.public OperationStatus delete(Transaction txn, DatabaseEntry key)
Calling this method is equivalent to calling delete(Transaction, DatabaseEntry, WriteOptions)
.
txn
- For a transactional database, an explicit transaction may
be specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- the key used as
input.OperationStatus.NOTFOUND
if
the given key is not found in the database; otherwise OperationStatus.SUCCESS
.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is read-only.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.
This includes passing a null input key parameter, an input key parameter
with a null data array, or a partial key input parameter.public OperationResult get(Transaction txn, DatabaseEntry key, DatabaseEntry data, Get getType, ReadOptions options)
Get
type.
If the operation succeeds, the record will be locked according to the
lock mode
specified, the key and/or
data will be returned via the (non-null) DatabaseEntry parameters, and a
non-null OperationResult will be returned. If the operation fails
because the record requested is not found, null is returned.
The following table lists each allowed operation and whether the key
and data parameters are input or
output parameters. See the individual Get
operations for
more information.
Get operation | Description | 'key' parameter | 'data' parameter |
---|---|---|---|
Get.SEARCH |
Searches using an exact match by key. | input | output |
Get.SEARCH_BOTH |
Searches using an exact match by key and data. | input | input |
txn
- For a transactional database, an explicit transaction may be
specified to transaction-protect the operation, or null may be specified
to perform the operation without transaction protection. For a
non-transactional database, null must be specified.key
- the key input parameter.data
- the data input or output parameter, depending on getType.getType
- the Get operation type. May not be null.options
- the ReadOptions, or null to use default options.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.
This includes passing a null getType, a null input key/data parameter,
an input key/data parameter with a null data array, and a partial
key/data input parameter.public OperationStatus get(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Cursor
operations.
Calling this method is equivalent to calling get(Transaction, DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.SEARCH
.
txn
- For a transactional database, an explicit transaction may be
specified to transaction-protect the operation, or null may be specified
to perform the operation without transaction protection. For a
non-transactional database, null must be specified.key
- the key used as
input.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getSearchBoth(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(Transaction, DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.SEARCH_BOTH
.
txn
- For a transactional database, an explicit transaction may be
specified to transaction-protect the operation, or null may be specified
to perform the operation without transaction protection. For a
non-transactional database, null must be specified.key
- the key used as
input.data
- the data used as
input.lockMode
- the locking attributes; if null, default attributes are
used.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationResult put(Transaction txn, DatabaseEntry key, DatabaseEntry data, Put putType, WriteOptions options)
Put
type.
If the operation succeeds, the record will be locked according to the
lock mode
specified, the cursor will
be positioned on the record, and a non-null OperationResult will be
returned. If the operation fails because the record already exists (or
does not exist, depending on the putType), null is returned.
When the database has associated secondary databases, this method also inserts or deletes associated index records as necessary.
The following table lists each allowed operation. See the individual
Put
operations for more information.
Put operation | Description | Returns null when? | Other special rules |
---|---|---|---|
Put.OVERWRITE |
Inserts or updates a record depending on whether a matching record is already present. | Never returns null. | Without duplicates, a matching record is one with the same key; with duplicates, it is one with the same key and data. |
Put.NO_OVERWRITE |
Inserts a record if a record with a matching key is not already present. | When an existing record matches. | If the database has duplicate keys, a record is inserted only if there are no records with a matching key. |
Put.NO_DUP_DATA |
Inserts a record in a database with duplicate keys if a record with a matching key and data is not already present. | When an existing record matches. | Without duplicates, this operation is not allowed. |
txn
- For a transactional database, an explicit transaction may be
specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- the key used as
input.data
- the data used as
input.putType
- the Put operation type. May not be null.options
- the WriteOptions, or null to use default options.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is read-only, or
putType is Put.NO_DUP_DATA and the database is not configured for
duplicates.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.
This includes passing a null putType, a null input key/data parameter,
an input key/data parameter with a null data array, a partial key/data
input parameter, or when putType is Put.CURRENT.public OperationStatus put(Transaction txn, DatabaseEntry key, DatabaseEntry data)
Calling this method is equivalent to calling put(Transaction, DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.OVERWRITE
.
If the key already appears in the database and duplicates are not configured, the data associated with the key will be replaced. If the key already appears in the database and sorted duplicates are configured, the new data value is inserted at the correct sorted location.
txn
- For a transactional database, an explicit transaction may be
specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- the key used as
input..data
- the data used as
input.OperationStatus.SUCCESS
.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is read-only.java.lang.IllegalStateException
- if the database has been closed.public OperationStatus putNoOverwrite(Transaction txn, DatabaseEntry key, DatabaseEntry data)
Calling this method is equivalent to calling put(Transaction, DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.NO_OVERWRITE
.
This method will return OpeationStatus.KEYEXIST
if
the key already exists in the database, even if the database supports
duplicates.
txn
- For a transactional database, an explicit transaction may be
specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- the key used as
input..data
- the data used as
input.OperationStatus.KEYEXIST
if the key already appears in the database,
else OperationStatus.SUCCESS
OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is read-only.java.lang.IllegalStateException
- if the database has been closed.public OperationStatus putNoDupData(Transaction txn, DatabaseEntry key, DatabaseEntry data)
Calling this method is equivalent to calling put(Transaction, DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.NO_DUP_DATA
.
This method may only be called if the underlying database has been configured to support sorted duplicates.
txn
- For a transactional database, an explicit transaction may be
specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified.key
- the key used as
input..data
- the data used as
input.OperationStatus.KEYEXIST
if the key/data pair already appears in the
database, else OperationStatus.SUCCESS
OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if this database is not configured
for duplicates, or this database is read-only.java.lang.IllegalStateException
- if the database has been closed.public JoinCursor join(Cursor[] cursors, JoinConfig config)
Each cursor in the cursors
array must have been
initialized to refer to the key on which the underlying database should
be joined. Typically, this initialization is done by calling Cursor.getSearchKey
.
Once the cursors have been passed to this method, they should not be accessed or modified until the newly created join cursor has been closed, or else inconsistent results may be returned. However, the position of the cursors will not be changed by this method or by the methods of the join cursor.
cursors
- an array of cursors associated with this primary
database.config
- The join attributes. If null, default attributes are
used.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified,
for example, an invalid JoinConfig
parameter.JoinCursor
public void preload(long maxBytes)
preload(PreloadConfig)
.maxBytes
- The maximum number of bytes to load. If maxBytes is 0,
je.evictor.maxMemory is used.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public void preload(long maxBytes, long maxMillisecs)
preload(PreloadConfig)
.maxBytes
- The maximum number of bytes to load. If maxBytes is 0,
je.evictor.maxMemory is used.maxMillisecs
- The maximum time in milliseconds to use when
preloading. Preloading stops once this limit has been reached. If
maxMillisecs is 0, preloading can go on indefinitely or until maxBytes
(if non-0) is reached.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public PreloadStats preload(PreloadConfig config)
ReplicationConfig.FEEDER_TIMEOUT
.
While this method preloads a single database, Environment.preload(com.sleepycat.je.Database[], com.sleepycat.je.PreloadConfig)
lets you preload multiple databases.
config
- The PreloadConfig object that specifies the parameters
of the preload.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if PreloadConfig.getMaxBytes
is
greater than size of the JE cache.public long count()
This operation uses the an internal infrastructure and algorithm that is
similar to the one used for the DiskOrderedCursor
. Specifically,
it will disable deletion of log files by the JE log cleaner during its
execution and will consume a certain amount of memory (but without
affecting the memory that is available for the JE cache). To avoid
excessive memory consumption (and a potential OutOfMemoryError
)
this method places an internal limit on its memory consumption. If this
limit is reached, the method will still work properly, but its
performance will degrade. To specify a different memory limit than the
one used by this method, use the
count(long memoryLimit)
method.
Currently, the internal memory limit is calculated as 10% of the difference between the max JVM memory (the value returned by Runtime.getRuntime().maxMemory()) and the configured JE cache size.
OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public long count(long memoryLimit)
This operation uses the an internal infrastructure and algorithm that is
similar to the one used for the DiskOrderedCursor
. Specifically,
it will disable deletion of log files by the JE log cleaner during its
execution and will consume a certain amount of memory (but without
affecting the memory that is available for the JE cache). To avoid
excessive memory consumption (and a potential OutOfMemoryError
)
this method takes as input an upper bound on the memory it may consume.
If this limit is reached, the method will still work properly, but its
performance will degrade.
memoryLimit
- The maximum memory (in bytes) that may be consumed
by this method.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public DatabaseStats getStats(StatsConfig config)
If this method has not been configured to avoid expensive operations
(using the StatsConfig.setFast
method), it will access some of or all the pages in
the database, incurring a severe performance penalty as well as possibly
flushing the underlying cache.
In the presence of multiple threads or processes accessing an active database, the information returned by this method may be out-of-date.
config
- The statistics returned; if null, default statistics are
returned.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public DatabaseStats verify(VerifyConfig config)
Verification is an expensive operation that should normally only be used for troubleshooting and debugging.
config
- Configures the verify operation; if null, the default
operation is performed.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if a corruption is detected, or if
an unexpected, internal or environment-wide failure occurs. If a
persistent corruption is detected,
EnvironmentFailureException.isCorrupted()
will return true.java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public java.lang.String getDatabaseName()
This method may be called at any time during the life of the application.
EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public DatabaseConfig getConfig()
This may differ from the configuration used to open this object if the database existed previously.
Unlike most Database methods, this method may be called after the database is closed.
EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the database has been closed.public Environment getEnvironment()
Environment
handle for
the database environment underlying the Database
.
This method may be called at any time during the life of the application.
Environment
handle
for the database environment underlying the Database
.public java.util.List<SecondaryDatabase> getSecondaryDatabases()
SecondaryDatabase
objects associated with a primary database.
If no secondaries are associated with this database, an empty list is returned.
public int compareKeys(DatabaseEntry entry1, DatabaseEntry entry2)
java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if either entry is a partial
DatabaseEntry, or is null.public int compareDuplicates(DatabaseEntry entry1, DatabaseEntry entry2)
java.lang.IllegalStateException
- if the database has been closed.java.lang.IllegalArgumentException
- if either entry is a partial
DatabaseEntry, or is null.Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.