setOption (Database - Java)

Sets the value of a database option.

Note: This method is new with Release 6.5.

Defined in

Database

Syntax

public void setOption(int optionname, boolean flag)
    throws NotesException

Parameters

int optionname

One of the following:

  • Database.DBOPT_LZ1 uses LZ1 compression for attachments
  • Database.DBOPT_LZCOMPRESSION uses LZ1 compression for attachments
  • Database.DBOPT_MAINTAINLASTACCESSED maintains LastAccessed property
  • Database.DBOPT_MOREFIELDS allows more fields in database
  • Database.DBOPT_NOHEADLINEMONITORS doesn't allow headline monitoring
  • Database.DBOPT_NOOVERWRITE doesn't overwrite free space
  • Database.DBOPT_NORESPONSEINFO doesn't support specialized response hierarchy
  • Database.DBOPT_NOTRANSACTIONLOGGING disables transaction logging
  • Database.DBOPT_NOUNREAD doesn't maintain unread marks
  • Database.DBOPT_OPTIMIZATION enables document table bitmap optimization
  • Database.DBOPT_REPLICATEUNREADMARKSTOANY replicates unread marks to all servers
  • Database.DBOPT_REPLICATEUNREADMARKSTOCLUSTER replicates unread marks to clustered servers only
  • Database.DBOPT_SOFTDELETE allows soft deletions
boolean flag
  • true to enable the option
  • false to disable the option

Usage

Compact the database to ensure that the option takes effect. See compact.

See getOption for getting a database option.

Setting DBOPT_REPLICATEUNREADMARKSTOANY true also sets DBOPT_REPLICATEUNREADMARKSTOCLUSTER true. Setting DBOPT_REPLICATEUNREADMARKSTOCLUSTER true sets DBOPT_REPLICATEUNREADMARKSTOANY false. Setting both options false means unread marks are never replicated.

The database must be open. Otherwise this method throws NOTES_ERR_DATABASE_NOTOPEN (4063).

Example