Berkeley DB: DbSequence::set_cachesize
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++

### DbSequence::set_cachesize |

`

###

    #include <db_cxx.h>

    int
    DbSequence::set_cachesize(int32_t size);

    int DbSequence::get_cachesize(*sizep);

### Description: DbSequence::set_cachesize

Configure the number of elements cached by a sequence handle.

The DbSequence::set_cachesize method may not be called after the DbSequence::open method is called.

The DbSequence::set_cachesize method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

size
  The number of elements in the cache.

### Errors

The DbSequence::set_cachesize method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

EINVAL
  An invalid flag value or parameter was specified.

### Description: DbSequence::get_cachesize

The DbSequence::get_cachesize method returns the current cache size.

The DbSequence::get_cachesize method may be called at any time during the life of the application.

The DbSequence::get_cachesize method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

sizep
  The DbSequence::get_cachesize method returns the current cache size in sizep.

### Class

DbSequence

### See Also

Sequences and Related Methods`

Copyright (c) 1996,2007 Oracle. All rights reserved.