Examples: IsInMultiDbIndexing property

This agent toggles the setting for including the current database in multi-database indexing.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      if (db.isInMultiDbIndexing()) {
        db.setInMultiDbIndexing(false);
        System.out.println("Do not include in multi-db indexing.");
      }
      else {
        db.setInMultiDbIndexing(true);
        System.out.println("Include in multi-db indexing.");
      }

    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}