/** * Get a mostly empty repair-operation buffer that can be filled in as * needed. The buffer created by this method cannot have the options * bitmask set on it. */ private ServiceRequestBuffer createDefaultRepairSRB(FbService service) { return createRepairSRB(service, 0); }
/** * Get a mostly empty repair-operation buffer that can be filled in as * needed. The buffer created by this method cannot have the options * bitmask set on it. */ private ServiceRequestBuffer createDefaultRepairSRB(FbService service) { return createRepairSRB(service, 0); }
public void validateDatabase(int options) throws SQLException { if (options < 0 || options != 0 && options != VALIDATE_IGNORE_CHECKSUM && (options & ~VALIDATE_IGNORE_CHECKSUM) != VALIDATE_READ_ONLY && (options & ~VALIDATE_IGNORE_CHECKSUM) != VALIDATE_FULL && (options | (VALIDATE_READ_ONLY | VALIDATE_IGNORE_CHECKSUM)) != options && (options | (VALIDATE_FULL | VALIDATE_IGNORE_CHECKSUM)) != options) { throw new IllegalArgumentException("options must be either 0, " + "VALIDATE_READ_ONLY, or VALIDATE_FULL, optionally combined with VALIDATE_IGNORE_CHECKSUM"); } try (FbService service = attachServiceManager()) { ServiceRequestBuffer srb = createRepairSRB(service, options | isc_spb_rpr_validate_db); executeServicesOperation(service, srb); } }
public void validateDatabase(int options) throws SQLException { if (options < 0 || options != 0 && options != VALIDATE_IGNORE_CHECKSUM && (options & ~VALIDATE_IGNORE_CHECKSUM) != VALIDATE_READ_ONLY && (options & ~VALIDATE_IGNORE_CHECKSUM) != VALIDATE_FULL && (options | (VALIDATE_READ_ONLY | VALIDATE_IGNORE_CHECKSUM)) != options && (options | (VALIDATE_FULL | VALIDATE_IGNORE_CHECKSUM)) != options) { throw new IllegalArgumentException("options must be either 0, " + "VALIDATE_READ_ONLY, or VALIDATE_FULL, optionally combined with VALIDATE_IGNORE_CHECKSUM"); } try (FbService service = attachServiceManager()) { ServiceRequestBuffer srb = createRepairSRB(service, options | isc_spb_rpr_validate_db); executeServicesOperation(service, srb); } }
/** * Execute a isc_spb_rpr_* (repair) services operation. * * @param operation * The identifier for the operation to be executed * @throws SQLException * if a database access error occurs */ private void executeRepairOperation(int operation) throws SQLException { try (FbService service = attachServiceManager()) { ServiceRequestBuffer srb = createRepairSRB(service, operation); executeServicesOperation(service, srb); } }
/** * Execute a isc_spb_rpr_* (repair) services operation. * * @param operation * The identifier for the operation to be executed * @throws SQLException * if a database access error occurs */ private void executeRepairOperation(int operation) throws SQLException { try (FbService service = attachServiceManager()) { ServiceRequestBuffer srb = createRepairSRB(service, operation); executeServicesOperation(service, srb); } }