@@ -218,7 +218,8 @@ private void createCbHourlyAvg() {
218
218
timeFrame .begin ().add (Calendar .DAY_OF_YEAR , 1 );
219
219
timeFrame .end ().add (Calendar .DAY_OF_YEAR , 1 );
220
220
LOG .info ("Prepared Coinbase Hour Data for: " + sdf .format (timeFrame .begin ().getTime ()) + " Time: "
221
- + (new Date ().getTime () - start .getTime ()) + "ms" );
221
+ + (new Date ().getTime () - start .getTime ()) + "ms" + " properties: "
222
+ + (cbFunctionCache .size () / 2 ));
222
223
}
223
224
LOG .info (this .serviceUtils .createAvgLogStatement (startAll , "Prepared Coinbase Hourly Data Time:" ));
224
225
}
@@ -250,7 +251,8 @@ private void createCbDailyAvg() {
250
251
timeFrame .begin ().add (Calendar .DAY_OF_YEAR , 1 );
251
252
timeFrame .end ().add (Calendar .DAY_OF_YEAR , 1 );
252
253
LOG .info ("Prepared Coinbase Day Data for: " + sdf .format (timeFrame .begin ().getTime ()) + " Time: "
253
- + (new Date ().getTime () - start .getTime ()) + "ms" );
254
+ + (new Date ().getTime () - start .getTime ()) + "ms" + " properties: "
255
+ + (cbFunctionCache .size () / 2 ));
254
256
}
255
257
LOG .info (this .serviceUtils .createAvgLogStatement (startAll , "Prepared Coinbase Daily Data Time:" ));
256
258
}
@@ -329,25 +331,33 @@ private GetSetMethodFunctions createGetMethodFunction(PropertyDescriptor propert
329
331
if (gsmf == null ) {
330
332
final MethodHandles .Lookup lookupGetter = MethodHandles .lookup ();
331
333
final MethodHandles .Lookup lookupSetter = MethodHandles .lookup ();
332
- record GetSetMethods (Method getterMethod , Method setterMethod ) { }
333
- var result = switch (propertyDescriptor .getName ().toLowerCase ()) {
334
- case "1inch" -> new GetSetMethods (Stream .of (QuoteCb .class .getMethods ())
335
- .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("get1Inch" )).findFirst ()
336
- .orElseThrow (), Stream .of (QuoteCb .class .getMethods ())
337
- .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("set1Inch" )).findFirst ()
338
- .orElseThrow ());
339
- case "super" -> new GetSetMethods (Stream .of (QuoteCb .class .getMethods ())
340
- .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("getSuper" )).findFirst ()
341
- .orElseThrow (),Stream .of (QuoteCb .class .getMethods ())
342
- .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("setSuper" )).findFirst ()
343
- .orElseThrow ());
344
- case "try" -> new GetSetMethods (Stream .of (QuoteCb .class .getMethods ())
345
- .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("getTry1" )).findFirst ()
346
- .orElseThrow (),Stream .of (QuoteCb .class .getMethods ())
347
- .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("setTry1" )).findFirst ()
348
- .orElseThrow ());
349
- default -> new GetSetMethods (propertyDescriptor .getReadMethod (), propertyDescriptor .getWriteMethod ());
350
- };
334
+ record GetSetMethods (Method getterMethod , Method setterMethod ) {
335
+ }
336
+ var result = switch (propertyDescriptor .getName ().toLowerCase ()) {
337
+ case "1inch" -> new GetSetMethods (
338
+ Stream .of (QuoteCb .class .getMethods ())
339
+ .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("get1Inch" )).findFirst ()
340
+ .orElseThrow (),
341
+ Stream .of (QuoteCb .class .getMethods ())
342
+ .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("set1Inch" )).findFirst ()
343
+ .orElseThrow ());
344
+ case "super" -> new GetSetMethods (
345
+ Stream .of (QuoteCb .class .getMethods ())
346
+ .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("getSuper" )).findFirst ()
347
+ .orElseThrow (),
348
+ Stream .of (QuoteCb .class .getMethods ())
349
+ .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("setSuper" )).findFirst ()
350
+ .orElseThrow ());
351
+ case "try" -> new GetSetMethods (
352
+ Stream .of (QuoteCb .class .getMethods ())
353
+ .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("getTry1" )).findFirst ()
354
+ .orElseThrow (),
355
+ Stream .of (QuoteCb .class .getMethods ())
356
+ .filter (myMethod -> myMethod .getName ().equalsIgnoreCase ("setTry1" )).findFirst ()
357
+ .orElseThrow ());
358
+ default ->
359
+ new GetSetMethods (propertyDescriptor .getReadMethod (), propertyDescriptor .getWriteMethod ());
360
+ };
351
361
@ SuppressWarnings ("unchecked" )
352
362
Function <QuoteCb , BigDecimal > getterFunction = (Function <QuoteCb , BigDecimal >) DtoUtils
353
363
.createGetter (lookupGetter , lookupGetter .unreflect (result .getterMethod ()));
0 commit comments