/** * Creates or deletes the specified index if the old and new state is different. * * @param type index type * @param data data reference * @param create new flag * @param old old flag * @param enforce enforce operation * @param cmd calling command instance * @throws IOException I/O exception */ private static void optimize( final IndexType type, final Data data, final boolean create, final boolean old, final boolean enforce, final Optimize cmd) throws IOException { // check if flags have changed if (create == old && !enforce) return; // create or drop index if (create) CreateIndex.create(type, data, cmd); else DropIndex.drop(type, data); }
public void visit(DropIndex entity) { wGetVisitor1().visit(entity.getIndexName()); }