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 = session.getDatabase(null, "TooBig");
if (db.isOpen())
{
int delta = db.compactWithOptions("bLS10");
System.out.println("Size difference in bytes = " + delta);
}
else
System.out.println("Could not open database");
} catch(Exception e) {
e.printStackTrace();
}
}
}
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 = session.getDatabase(null, "TooBig");
if (db.isOpen())
{
int options = Database.CMPC_RECOVER_REDUCE_INPLACE +
Database.CMPC_NO_LOCKOUT;
int delta = db.compactWithOptions(options, "10");
System.out.println("Size difference in bytes = " + delta);
}
else
System.out.println("Could not open database");
} catch(Exception e) {
e.printStackTrace();
}
}
}