Skip to content

Commit 32bec2f

Browse files
committed
Format fix
1 parent 395ceff commit 32bec2f

5 files changed

Lines changed: 102 additions & 53 deletions

File tree

data-sdk/src/main/java/com/logicmonitor/sdk/data/Configuration.java

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ public static String setCompany() {
125125
return host;
126126
}
127127

128-
/** @return boolean */
128+
/**
129+
* @return boolean
130+
*/
129131
public boolean checkAuthentication() {
130132
boolean flagBearerCheck = true;
131133
boolean flagLMv1Check = true;
@@ -219,17 +221,23 @@ public static String getAuthToken(Object body, String method, String resourcePat
219221
return token;
220222
}
221223

222-
/** @return boolean */
224+
/**
225+
* @return boolean
226+
*/
223227
public static boolean getAsyncRequest() {
224228
return Boolean.FALSE;
225229
}
226230

227-
/** @return configuration */
231+
/**
232+
* @return configuration
233+
*/
228234
public static Configuration getConfiguration() {
229235
return configuration;
230236
}
231237

232-
/** @return company */
238+
/**
239+
* @return company
240+
*/
233241
public static String getCompany() {
234242
return company;
235243
}
@@ -238,22 +246,30 @@ public static String getDomainName() {
238246
return domainName;
239247
}
240248

241-
/** @return gZip */
249+
/**
250+
* @return gZip
251+
*/
242252
public static boolean getgZip() {
243253
return gZip;
244254
}
245255

246-
/** @param gZip */
256+
/**
257+
* @param gZip
258+
*/
247259
public static void setgZip(boolean gZip) {
248260
Configuration.gZip = gZip;
249261
}
250262

251-
/** @return requestPerMinute */
263+
/**
264+
* @return requestPerMinute
265+
*/
252266
public static int getRequestPerMinute() {
253267
return requestPerMinute;
254268
}
255269

256-
/** @param requestPerMinute */
270+
/**
271+
* @param requestPerMinute
272+
*/
257273
public static void setRequestPerMinute(int requestPerMinute) {
258274
Configuration.requestPerMinute = requestPerMinute;
259275
}

data-sdk/src/main/java/com/logicmonitor/sdk/data/api/Logs.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public Logs(
5252
apiClient.setBasePath(Configuration.setCompany());
5353
}
5454

55-
/** @param conf This is configuration variable */
55+
/**
56+
* @param conf This is configuration variable
57+
*/
5658
public Logs(final Configuration conf) {
5759
super(conf);
5860
apiClient.setBasePath(Configuration.setCompany());
@@ -81,7 +83,7 @@ protected static ApiResponse singleRequest(final LogsInput logsV1)
8183
body.put("message", logsV1.getMessage());
8284
body.put("_lm.resourceId", logsV1.getResourceId());
8385
body.put("timestamp", logsV1.getTimeStamp());
84-
body.put("log_level",logsV1.getLogLevel());
86+
body.put("log_level", logsV1.getLogLevel());
8587
if (logsV1.getMetadata() != null) {
8688
for (Map.Entry<String, String> entry : logsV1.getMetadata().entrySet()) {
8789
body.put(entry.getKey(), entry.getValue());
@@ -154,7 +156,8 @@ public Optional<ApiResponse> sendLogs(
154156
if (timeStamp == 0L) {
155157
timeStamp = Instant.now().toEpochMilli();
156158
}
157-
final LogsInput logsV1 = new LogsInput(message, logLevel, resourceId, Long.toString(timeStamp), metadata);
159+
final LogsInput logsV1 =
160+
new LogsInput(message, logLevel, resourceId, Long.toString(timeStamp), metadata);
158161

159162
if (batch) {
160163
addRequest(logsV1);
@@ -163,7 +166,9 @@ public Optional<ApiResponse> sendLogs(
163166
return Optional.ofNullable(singleRequest(logsV1));
164167
}
165168

166-
/** @return List<Map < String, Object>> */
169+
/**
170+
* @return List<Map < String, Object>>
171+
*/
167172
private List<Map<String, Object>> createBody() {
168173
final DecimalFormat df = new DecimalFormat("0.00");
169174
final List<Map<String, Object>> logBody = new ArrayList<>();
@@ -172,7 +177,7 @@ private List<Map<String, Object>> createBody() {
172177
body.put("message", logsV1.getMessage());
173178
body.put("_lm.resourceId", logsV1.getResourceId());
174179
body.put("timestamp", logsV1.getTimeStamp());
175-
body.put("log_level",logsV1.getLogLevel());
180+
body.put("log_level", logsV1.getLogLevel());
176181
if (logsV1.getMetadata() != null) {
177182
for (Map.Entry<String, String> entry : logsV1.getMetadata().entrySet()) {
178183
body.put(entry.getKey(), entry.getValue());
@@ -192,7 +197,9 @@ private List<Map<String, Object>> createBody() {
192197
return logBody;
193198
}
194199

195-
/** @param client */
200+
/**
201+
* @param client
202+
*/
196203
public void setApiClient(ApiClient client) {
197204
this.apiClient = client;
198205
}

data-sdk/src/main/java/com/logicmonitor/sdk/data/api/Metrics.java

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ public Metrics(final Configuration conf, ApiCallback apiCallback) {
8888
apiClient.setBasePath(conf.setCompany());
8989
}
9090

91-
/** @param conf This is configuration variable */
91+
/**
92+
* @param conf This is configuration variable
93+
*/
9294
public Metrics(final Configuration conf) {
9395
super(conf);
9496
apiClient.setBasePath(conf.setCompany());
@@ -463,27 +465,38 @@ public ApiResponse<String> updateInstanceProperties(
463465
protected void doRequest() {
464466
createRestMetricsBody(payloadCache);
465467
}
466-
/** @param validator */
468+
469+
/**
470+
* @param validator
471+
*/
467472
public void setValidator(Validator validator) {
468473
this.validator = validator;
469474
}
470475

471-
/** @param client */
476+
/**
477+
* @param client
478+
*/
472479
public void setApiClient(ApiClient client) {
473480
this.apiClient = client;
474481
}
475482

476-
/** @param resourceValidator */
483+
/**
484+
* @param resourceValidator
485+
*/
477486
public void setResourceValidator(ResourceValidator resourceValidator) {
478487
this.resourceValidator = resourceValidator;
479488
}
480489

481-
/** @param dataSourceValidator */
490+
/**
491+
* @param dataSourceValidator
492+
*/
482493
public void setDataSourceValidator(DataSourceValidator dataSourceValidator) {
483494
this.dataSourceValidator = dataSourceValidator;
484495
}
485496

486-
/** @param dataSourceInstanceValidator */
497+
/**
498+
* @param dataSourceInstanceValidator
499+
*/
487500
public void setDataSourceInstanceValidator(
488501
DataSourceInstanceValidator dataSourceInstanceValidator) {
489502
this.dataSourceInstanceValidator = dataSourceInstanceValidator;

data-sdk/src/main/java/com/logicmonitor/sdk/data/internal/BatchingCache.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public abstract class BatchingCache {
5151

5252
private static int metricsCounter = 1, logCounter = 1;
5353

54-
/** @param conf This is configuration variable */
54+
/**
55+
* @param conf This is configuration variable
56+
*/
5557
public BatchingCache(final Configuration conf) {
5658
this(conf, 10, true);
5759
}
@@ -94,7 +96,9 @@ public BatchingCache(final Configuration conf, ApiCallback responseCallback) {
9496
apiCallback = responseCallback;
9597
}
9698

97-
/** @param response */
99+
/**
100+
* @param response
101+
*/
98102
protected void responseHandler(ApiResponse response) {
99103
ApiException apiException = new ApiException();
100104
if (response != null) {
@@ -119,7 +123,9 @@ protected void responseHandler(ApiResponse response) {
119123
/** Abstract Method. */
120124
protected abstract void doRequest();
121125

122-
/** @param body */
126+
/**
127+
* @param body
128+
*/
123129
public void addRequest(final Input body) {
124130
synchronized (queueLock) {
125131
rawRequest.add(body);
@@ -288,7 +294,9 @@ public ApiResponse<String> makeRequest(
288294
return syncReponse;
289295
}
290296

291-
/** @return queue. */
297+
/**
298+
* @return queue.
299+
*/
292300
public Queue<Input> getRequest() {
293301
return rawRequest;
294302
}

data-sdk/src/test/java/com/logicmonitor/sdk/data/api/TestLogs.java

Lines changed: 34 additions & 29 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)