Skip to content

Commit 32d6fd8

Browse files
committed
Add missing @OverRide, remove duplicate javadoc
1 parent 724b509 commit 32d6fd8

6 files changed

Lines changed: 30 additions & 75 deletions

File tree

src/main/org/firebirdsql/management/FBBackupManager.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ public FBBackupManager(GDSType gdsType) {
6464
super(gdsType);
6565
}
6666

67+
@Override
6768
public void setBackupPath(String backupPath) {
6869
addBackupPath(backupPath, -1);
6970
noLimitBackup = true;
7071
}
7172

73+
@Override
7274
public void addBackupPath(String path, int size) {
7375
if (noLimitBackup) {
7476
throw new IllegalArgumentException(
@@ -77,29 +79,27 @@ public void addBackupPath(String path, int size) {
7779
backupPaths.add(new PathSizeStruct(path, size));
7880
}
7981

82+
@Override
8083
public void clearBackupPaths() {
8184
backupPaths.clear();
8285
noLimitBackup = false;
8386
}
8487

88+
@Override
8589
public void backupDatabase(int options) throws SQLException {
8690
try (FbService service = attachServiceManager()) {
8791
executeServicesOperation(service, getBackupSRB(service, options));
8892
}
8993
}
9094

95+
@Override
9196
public void restoreDatabase(int options) throws SQLException {
9297
try (FbService service = attachServiceManager()) {
9398
executeServicesOperation(service, getRestoreSRB(service, options));
9499
}
95100
}
96101

97-
/**
98-
* Adds the currentDatabase as a source for the backup operation
99-
*
100-
* @param backupSPB
101-
* The buffer to be used during the backup operation
102-
*/
102+
@Override
103103
protected void addBackupsToBackupRequestBuffer(FbService service, ServiceRequestBuffer backupSPB)
104104
throws SQLException {
105105
for (Iterator<PathSizeStruct> iter = backupPaths.iterator(); iter.hasNext();) {
@@ -116,12 +116,7 @@ protected void addBackupsToBackupRequestBuffer(FbService service, ServiceRequest
116116
}
117117
}
118118

119-
/**
120-
* Adds the list of backups to be used for the restore operation
121-
*
122-
* @param restoreSPB
123-
* The buffer to be used during the restore operation
124-
*/
119+
@Override
125120
protected void addBackupsToRestoreRequestBuffer(FbService service, ServiceRequestBuffer restoreSPB) {
126121
for (PathSizeStruct pathSize : backupPaths) {
127122
restoreSPB.addArgument(isc_spb_bkp_file, pathSize.path());

src/main/org/firebirdsql/management/FBBackupManagerBase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,16 @@ protected ServiceRequestBuffer getRestoreSRB(FbService service, int options) thr
377377
* Adds the backup source for the backup operation, depending on the manager used
378378
*
379379
* @param backupSPB
380-
* The buffer to be used during the backup operation
380+
* buffer to be used during the backup operation
381381
*/
382382
protected abstract void addBackupsToBackupRequestBuffer(FbService service, ServiceRequestBuffer backupSPB)
383383
throws SQLException;
384384

385385
/**
386386
* Adds the backup files to be used during restore
387+
*
388+
* @param restoreSPB
389+
* buffer to be used during the restore operation
387390
*/
388391
protected abstract void addBackupsToRestoreRequestBuffer(FbService service, ServiceRequestBuffer restoreSPB);
389392

src/main/org/firebirdsql/management/FBServiceManager.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,12 @@ public Map<ConnectionProperty, Object> connectionPropertyValues() {
273273
return serviceProperties.connectionPropertyValues();
274274
}
275275

276-
/**
277-
* @return Returns the out.
278-
*/
276+
@Override
279277
public synchronized @Nullable OutputStream getLogger() {
280278
return logger;
281279
}
282280

283-
/**
284-
* @param logger
285-
* The out to set.
286-
*/
281+
@Override
287282
public synchronized void setLogger(@Nullable OutputStream logger) {
288283
this.logger = logger;
289284
}

src/main/org/firebirdsql/management/FBStatisticsManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,23 @@ public FBStatisticsManager(GDSType gdsType) {
7575
super(gdsType);
7676
}
7777

78+
@Override
7879
public void getHeaderPage() throws SQLException {
7980
try (FbService service = attachServiceManager()) {
8081
ServiceRequestBuffer srb = createStatsSRB(service, isc_spb_sts_hdr_pages);
8182
executeServicesOperation(service, srb);
8283
}
8384
}
8485

86+
@Override
8587
public void getDatabaseStatistics() throws SQLException {
8688
try (FbService service = attachServiceManager()) {
8789
ServiceRequestBuffer srb = createDefaultStatsSRB(service);
8890
executeServicesOperation(service, srb);
8991
}
9092
}
9193

94+
@Override
9295
public void getDatabaseStatistics(int options) throws SQLException {
9396
if (options != 0 && (options | POSSIBLE_STATISTICS) != POSSIBLE_STATISTICS) {
9497
throw new IllegalArgumentException("options must be 0 or a "

src/main/org/firebirdsql/management/FBStreamingBackupManager.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ public FBStreamingBackupManager(GDSType gdsType) {
8585
super(gdsType);
8686
}
8787

88+
@Override
8889
public void setBackupPath(String backupPath) {
8990
throw new IllegalArgumentException("You cannot use setBackupPath(String) for Streaming backups.");
9091
}
9192

93+
@Override
9294
public void addBackupPath(String path, int size) {
9395
throw new IllegalArgumentException("You cannot use setBackupPath(String) for Streaming backups.");
9496
}
@@ -103,10 +105,12 @@ public void setRestoreInputStream(InputStream restoreStream) {
103105
: new BufferedInputStream(restoreStream, 128 * MAX_RESTORE_CHUNK);
104106
}
105107

108+
@Override
106109
public void clearBackupPaths() {
107110
backupOutputStream = null;
108111
}
109112

113+
@Override
110114
public void backupDatabase(int options) throws SQLException {
111115
final OutputStream backupOutputStream = this.backupOutputStream;
112116
if (backupOutputStream == null) {
@@ -118,6 +122,7 @@ public void backupDatabase(int options) throws SQLException {
118122
}
119123
}
120124

125+
@Override
121126
public void restoreDatabase(int options) throws SQLException {
122127
final InputStream restoreInputStream = this.restoreInputStream;
123128
if (restoreInputStream == null) {
@@ -131,6 +136,7 @@ public void restoreDatabase(int options) throws SQLException {
131136
/**
132137
* Streaming backups are currently not capable of verbose output
133138
*/
139+
@Override
134140
protected boolean verboseBackup() {
135141
return false;
136142
}
@@ -155,22 +161,12 @@ public void setRestorePageSize(int pageSize) {
155161
super.setRestorePageSize(pageSize);
156162
}
157163

158-
/**
159-
* Adds stdout as a source for the backup operation
160-
*
161-
* @param backupSPB
162-
* The buffer to be used during the backup operation
163-
*/
164+
@Override
164165
protected void addBackupsToBackupRequestBuffer(FbService service, ServiceRequestBuffer backupSPB) {
165166
backupSPB.addArgument(isc_spb_bkp_file, "stdout");
166167
}
167168

168-
/**
169-
* Adds stdin as a source for the restore operation
170-
*
171-
* @param restoreSPB
172-
* The buffer to be used during the restore operation
173-
*/
169+
@Override
174170
protected void addBackupsToRestoreRequestBuffer(FbService service, ServiceRequestBuffer restoreSPB) {
175171
restoreSPB.addArgument(isc_spb_bkp_file, "stdin");
176172
}

src/main/org/firebirdsql/management/FBTraceManager.java

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,7 @@ private ServiceRequestBuffer getTraceSPB(FbService service, int action, String t
129129
return traceSPB;
130130
}
131131

132-
/**
133-
* Starts a trace session with an optional trace session name and configuration
134-
*
135-
* @param traceSessionName
136-
* The trace session name (optional)
137-
* @param configuration
138-
* The trace configuration. For an example, look into fbtrace.conf in the root directory of your
139-
* Firebird installation
140-
*/
132+
@Override
141133
public void startTraceSession(@Nullable String traceSessionName, String configuration) throws SQLException {
142134
if (isNullOrEmpty(configuration)) {
143135
throw new SQLException("No configuration provided");
@@ -160,64 +152,35 @@ public void startTraceSession(@Nullable String traceSessionName, String configur
160152
}
161153
}
162154

163-
/**
164-
* Stops a trace session with the given trace session ID
165-
*
166-
* @param traceSessionId
167-
* The trace session ID
168-
*/
155+
@Override
169156
public void stopTraceSession(int traceSessionId) throws SQLException {
170157
try (FbService service = attachServiceManager()) {
171158
executeServicesOperation(service, getTraceSPB(service, isc_action_svc_trace_stop, traceSessionId));
172159
}
173160
}
174161

175-
/**
176-
* Suspends a trace session with the given trace session ID
177-
*
178-
* @param traceSessionId
179-
* The trace session ID
180-
*/
162+
@Override
181163
public void suspendTraceSession(int traceSessionId) throws SQLException {
182164
try (FbService service = attachServiceManager()) {
183165
executeServicesOperation(service, getTraceSPB(service, isc_action_svc_trace_suspend, traceSessionId));
184166
}
185167
}
186168

187-
/**
188-
* Resumes a trace session with the given trace session ID
189-
*
190-
* @param traceSessionId
191-
* The trace session ID
192-
*/
169+
@Override
193170
public void resumeTraceSession(int traceSessionId) throws SQLException {
194171
try (FbService service = attachServiceManager()) {
195172
executeServicesOperation(service, getTraceSPB(service, isc_action_svc_trace_resume, traceSessionId));
196173
}
197174
}
198175

199-
/**
200-
* List all currently registered trace sessions
201-
*/
176+
@Override
202177
public void listTraceSessions() throws SQLException {
203178
try (FbService service = attachServiceManager()) {
204179
executeServicesOperation(service, getTraceSPB(service, isc_action_svc_trace_list));
205180
}
206181
}
207182

208-
/**
209-
* Gets the sessionId for the given name.
210-
* <p>
211-
* Returns null if the sessionName does not exist or hasn't been initialized yet.
212-
* </p>
213-
* <p>
214-
* If multiple sessions are started with the same name, the last one is returned.
215-
* </p>
216-
*
217-
* @param sessionName
218-
* Name of the session
219-
* @return Id of the session or null otherwise
220-
*/
183+
@Override
221184
public @Nullable Integer getSessionId(String sessionName) {
222185
return traceSessions.get(sessionName);
223186
}

0 commit comments

Comments
 (0)