@@ -218,7 +218,8 @@ private void createCbHourlyAvg() {
218218 timeFrame .begin ().add (Calendar .DAY_OF_YEAR , 1 );
219219 timeFrame .end ().add (Calendar .DAY_OF_YEAR , 1 );
220220 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 ));
222223 }
223224 LOG .info (this .serviceUtils .createAvgLogStatement (startAll , "Prepared Coinbase Hourly Data Time:" ));
224225 }
@@ -250,7 +251,8 @@ private void createCbDailyAvg() {
250251 timeFrame .begin ().add (Calendar .DAY_OF_YEAR , 1 );
251252 timeFrame .end ().add (Calendar .DAY_OF_YEAR , 1 );
252253 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 ));
254256 }
255257 LOG .info (this .serviceUtils .createAvgLogStatement (startAll , "Prepared Coinbase Daily Data Time:" ));
256258 }
@@ -329,25 +331,33 @@ private GetSetMethodFunctions createGetMethodFunction(PropertyDescriptor propert
329331 if (gsmf == null ) {
330332 final MethodHandles .Lookup lookupGetter = MethodHandles .lookup ();
331333 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+ };
351361 @ SuppressWarnings ("unchecked" )
352362 Function <QuoteCb , BigDecimal > getterFunction = (Function <QuoteCb , BigDecimal >) DtoUtils
353363 .createGetter (lookupGetter , lookupGetter .unreflect (result .getterMethod ()));
0 commit comments