package com.l7tech.server.cluster;

import com.l7tech.gateway.common.cluster.ServiceUsage;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.server.event.system.ReadyForMessages;
import com.l7tech.server.event.system.Stopping;
import com.l7tech.server.service.ServiceCache;
import com.l7tech.server.util.ManagedTimer;
import com.l7tech.server.util.PostStartupApplicationListener;
import com.l7tech.util.Config;
import com.l7tech.util.ExceptionUtils;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.hibernate.HibernateException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public class MysqlServiceUsageManager extends HibernateDaoSupport implements ServiceUsageManager, PropertyChangeListener, PostStartupApplicationListener {
   private static final Logger a;
   private static final int b = 300000;
   private static final int c = 4000;
   private static final int d = 86400000;
   private static final int e = 8053;
   private static final String f;
   static final String g;
   static final String h;
   static final String i;
   private static final String j;
   private static final String k;
   private static final String l;
   static final int m = 0;
   private final String n;
   private final AtomicBoolean o = new AtomicBoolean();
   private Supplier<ServiceCache> p;
   private final Config q;
   private aa r;
   private final ApplicationContext s;
   private ManagedTimer t;
   private PlatformTransactionManager u;
   private static final String[] v;

   @Autowired
   public MysqlServiceUsageManager(ApplicationContext var1, Config var2, String var3) {
      this.n = var3;
      this.q = var2;
      this.s = var1;
      this.c();
      this.p = new q(this, var1);
      String[] var4 = v;
      this.t = (ManagedTimer)var1.getBean(var4[17], ManagedTimer.class);
      this.u = (PlatformTransactionManager)var1.getBean(var4[19], PlatformTransactionManager.class);
      this.r = new aa(this, var1, this.getHibernateTemplate(), this.u, var3);
   }

   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class, readOnly = true)
   @Override
   public Collection<ServiceUsage> getAll() throws FindException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aconst_null
      // 01: astore 1
      // 02: aconst_null
      // 03: astore 2
      // 04: aload 0
      // 05: invokevirtual com/l7tech/server/cluster/MysqlServiceUsageManager.getSessionFactory ()Lorg/hibernate/SessionFactory;
      // 08: invokestatic com/l7tech/server/HibernateEntityManager.useCurrentOrOpenNewSession (Lorg/hibernate/SessionFactory;)Lorg/hibernate/Session;
      // 0b: astore 1
      // 0c: aload 1
      // 0d: invokeinterface org/hibernate/Session.getHibernateFlushMode ()Lorg/hibernate/FlushMode; 1
      // 12: astore 2
      // 13: aload 1
      // 14: getstatic org/hibernate/FlushMode.MANUAL Lorg/hibernate/FlushMode;
      // 17: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 1c: aload 1
      // 1d: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.k Ljava/lang/String;
      // 20: invokeinterface org/hibernate/Session.createQuery (Ljava/lang/String;)Lorg/hibernate/query/Query; 2
      // 25: invokeinterface org/hibernate/query/Query.list ()Ljava/util/List; 1
      // 2a: astore 3
      // 2b: new java/util/HashSet
      // 2e: dup
      // 2f: aload 3
      // 30: invokespecial java/util/HashSet.<init> (Ljava/util/Collection;)V
      // 33: astore 4
      // 35: aload 4
      // 37: astore 5
      // 39: aload 1
      // 3a: ifnull 56
      // 3d: aload 2
      // 3e: ifnull 56
      // 41: goto 48
      // 44: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 47: athrow
      // 48: aload 1
      // 49: aload 2
      // 4a: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 4f: goto 56
      // 52: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 55: athrow
      // 56: aload 1
      // 57: invokestatic com/l7tech/server/HibernateEntityManager.closeNewSession (Lorg/hibernate/Session;)V
      // 5a: aload 5
      // 5c: areturn
      // 5d: astore 3
      // 5e: new com/l7tech/objectmodel/FindException
      // 61: dup
      // 62: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 65: bipush 6
      // 67: aaload
      // 68: aload 3
      // 69: invokespecial com/l7tech/objectmodel/FindException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
      // 6c: athrow
      // 6d: astore 6
      // 6f: aload 1
      // 70: ifnull 8c
      // 73: aload 2
      // 74: ifnull 8c
      // 77: goto 7e
      // 7a: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 7d: athrow
      // 7e: aload 1
      // 7f: aload 2
      // 80: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 85: goto 8c
      // 88: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 8b: athrow
      // 8c: aload 1
      // 8d: invokestatic com/l7tech/server/HibernateEntityManager.closeNewSession (Lorg/hibernate/Session;)V
      // 90: aload 6
      // 92: athrow
      // try (4 -> 26): 43 org/hibernate/HibernateException
      // try (4 -> 26): 52 null
      // try (28 -> 36): 37 org/hibernate/HibernateException
      // try (26 -> 30): 31 org/hibernate/HibernateException
      // try (43 -> 53): 52 null
      // try (53 -> 57): 58 org/hibernate/HibernateException
      // try (55 -> 63): 64 org/hibernate/HibernateException
   }

   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class, readOnly = true)
   @Override
   public ServiceUsage[] findByNode(String param1) throws FindException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aconst_null
      // 01: astore 2
      // 02: aconst_null
      // 03: astore 3
      // 04: aload 0
      // 05: invokevirtual com/l7tech/server/cluster/MysqlServiceUsageManager.getSessionFactory ()Lorg/hibernate/SessionFactory;
      // 08: invokestatic com/l7tech/server/HibernateEntityManager.useCurrentOrOpenNewSession (Lorg/hibernate/SessionFactory;)Lorg/hibernate/Session;
      // 0b: astore 2
      // 0c: aload 2
      // 0d: invokeinterface org/hibernate/Session.getHibernateFlushMode ()Lorg/hibernate/FlushMode; 1
      // 12: astore 3
      // 13: aload 2
      // 14: getstatic org/hibernate/FlushMode.MANUAL Lorg/hibernate/FlushMode;
      // 17: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 1c: aload 2
      // 1d: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.i Ljava/lang/String;
      // 20: invokeinterface org/hibernate/Session.createQuery (Ljava/lang/String;)Lorg/hibernate/query/Query; 2
      // 25: astore 4
      // 27: aload 4
      // 29: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 2c: astore 8
      // 2e: aload 8
      // 30: bipush 9
      // 32: aaload
      // 33: aload 1
      // 34: invokeinterface org/hibernate/query/Query.setParameter (Ljava/lang/String;Ljava/lang/Object;)Lorg/hibernate/query/Query; 3
      // 39: pop
      // 3a: aload 4
      // 3c: invokeinterface org/hibernate/query/Query.list ()Ljava/util/List; 1
      // 41: astore 5
      // 43: aload 5
      // 45: aload 5
      // 47: invokeinterface java/util/List.size ()I 1
      // 4c: anewarray 2
      // 4f: invokeinterface java/util/List.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 54: checkcast [Lcom/l7tech/gateway/common/cluster/ServiceUsage;
      // 57: astore 6
      // 59: aload 2
      // 5a: ifnull 76
      // 5d: aload 3
      // 5e: ifnull 76
      // 61: goto 68
      // 64: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 67: athrow
      // 68: aload 2
      // 69: aload 3
      // 6a: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 6f: goto 76
      // 72: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 75: athrow
      // 76: aload 2
      // 77: invokestatic com/l7tech/server/HibernateEntityManager.closeNewSession (Lorg/hibernate/Session;)V
      // 7a: aload 6
      // 7c: areturn
      // 7d: astore 4
      // 7f: new com/l7tech/objectmodel/FindException
      // 82: dup
      // 83: aload 1
      // 84: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 87: bipush 14
      // 89: aaload
      // 8a: swap
      // 8b: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // 90: aload 4
      // 92: invokespecial com/l7tech/objectmodel/FindException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
      // 95: athrow
      // 96: astore 7
      // 98: aload 2
      // 99: ifnull b5
      // 9c: aload 3
      // 9d: ifnull b5
      // a0: goto a7
      // a3: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // a6: athrow
      // a7: aload 2
      // a8: aload 3
      // a9: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // ae: goto b5
      // b1: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // b4: athrow
      // b5: aload 2
      // b6: invokestatic com/l7tech/server/HibernateEntityManager.closeNewSession (Lorg/hibernate/Session;)V
      // b9: aload 7
      // bb: athrow
      // try (4 -> 37): 54 org/hibernate/HibernateException
      // try (4 -> 37): 66 null
      // try (39 -> 47): 48 org/hibernate/HibernateException
      // try (37 -> 41): 42 org/hibernate/HibernateException
      // try (54 -> 67): 66 null
      // try (67 -> 71): 72 org/hibernate/HibernateException
      // try (69 -> 77): 78 org/hibernate/HibernateException
   }

   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class, readOnly = true)
   @Override
   public ServiceUsage[] findByServiceGoid(Goid param1) throws FindException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aconst_null
      // 01: astore 2
      // 02: aconst_null
      // 03: astore 3
      // 04: aload 0
      // 05: invokevirtual com/l7tech/server/cluster/MysqlServiceUsageManager.getSessionFactory ()Lorg/hibernate/SessionFactory;
      // 08: invokestatic com/l7tech/server/HibernateEntityManager.useCurrentOrOpenNewSession (Lorg/hibernate/SessionFactory;)Lorg/hibernate/Session;
      // 0b: astore 2
      // 0c: aload 2
      // 0d: invokeinterface org/hibernate/Session.getHibernateFlushMode ()Lorg/hibernate/FlushMode; 1
      // 12: astore 3
      // 13: aload 2
      // 14: getstatic org/hibernate/FlushMode.MANUAL Lorg/hibernate/FlushMode;
      // 17: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 1c: aload 2
      // 1d: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.l Ljava/lang/String;
      // 20: invokeinterface org/hibernate/Session.createQuery (Ljava/lang/String;)Lorg/hibernate/query/Query; 2
      // 25: astore 4
      // 27: aload 4
      // 29: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 2c: astore 8
      // 2e: aload 8
      // 30: bipush 15
      // 32: aaload
      // 33: aload 1
      // 34: invokeinterface org/hibernate/query/Query.setParameter (Ljava/lang/String;Ljava/lang/Object;)Lorg/hibernate/query/Query; 3
      // 39: pop
      // 3a: aload 4
      // 3c: invokeinterface org/hibernate/query/Query.list ()Ljava/util/List; 1
      // 41: astore 5
      // 43: aload 5
      // 45: aload 5
      // 47: invokeinterface java/util/List.size ()I 1
      // 4c: anewarray 2
      // 4f: invokeinterface java/util/List.toArray ([Ljava/lang/Object;)[Ljava/lang/Object; 2
      // 54: checkcast [Lcom/l7tech/gateway/common/cluster/ServiceUsage;
      // 57: astore 6
      // 59: aload 2
      // 5a: ifnull 76
      // 5d: aload 3
      // 5e: ifnull 76
      // 61: goto 68
      // 64: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 67: athrow
      // 68: aload 2
      // 69: aload 3
      // 6a: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // 6f: goto 76
      // 72: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 75: athrow
      // 76: aload 2
      // 77: invokestatic com/l7tech/server/HibernateEntityManager.closeNewSession (Lorg/hibernate/Session;)V
      // 7a: aload 6
      // 7c: areturn
      // 7d: astore 4
      // 7f: new com/l7tech/objectmodel/FindException
      // 82: dup
      // 83: aload 1
      // 84: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 87: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 8a: bipush 12
      // 8c: aaload
      // 8d: swap
      // 8e: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // 93: aload 4
      // 95: invokespecial com/l7tech/objectmodel/FindException.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
      // 98: athrow
      // 99: astore 7
      // 9b: aload 2
      // 9c: ifnull b8
      // 9f: aload 3
      // a0: ifnull b8
      // a3: goto aa
      // a6: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // a9: athrow
      // aa: aload 2
      // ab: aload 3
      // ac: invokeinterface org/hibernate/Session.setHibernateFlushMode (Lorg/hibernate/FlushMode;)V 2
      // b1: goto b8
      // b4: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // b7: athrow
      // b8: aload 2
      // b9: invokestatic com/l7tech/server/HibernateEntityManager.closeNewSession (Lorg/hibernate/Session;)V
      // bc: aload 7
      // be: athrow
      // try (4 -> 37): 54 org/hibernate/HibernateException
      // try (4 -> 37): 67 null
      // try (39 -> 47): 48 org/hibernate/HibernateException
      // try (37 -> 41): 42 org/hibernate/HibernateException
      // try (54 -> 68): 67 null
      // try (68 -> 72): 73 org/hibernate/HibernateException
      // try (70 -> 78): 79 org/hibernate/HibernateException
   }

   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
   @Override
   public void record(ServiceUsage var1) {
      try {
         this.getHibernateTemplate().saveOrUpdate(var1);
      } catch (DataAccessException var3) {
         a.log(Level.SEVERE, v[0], ExceptionUtils.getDebugException(var3));
      }
   }

   @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
   @Override
   public void clear(String var1) {
      try {
         this.getHibernateTemplate().execute(new r(this, var1));
      } catch (DataAccessException var3) {
         a.log(Level.SEVERE, v[2], ExceptionUtils.getDebugException(var3));
      }
   }

   public List<ServiceUsage> getServiceUsageFromCache(String param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: new java/util/ArrayList
      // 03: dup
      // 04: invokespecial java/util/ArrayList.<init> ()V
      // 07: astore 2
      // 08: aload 0
      // 09: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.p Ljava/util/function/Supplier;
      // 0c: invokeinterface java/util/function/Supplier.get ()Ljava/lang/Object; 1
      // 11: checkcast com/l7tech/server/service/ServiceCache
      // 14: invokevirtual com/l7tech/server/service/ServiceCache.getAllServiceStatistics ()Ljava/util/Collection;
      // 17: astore 3
      // 18: aload 3
      // 19: ifnull 2c
      // 1c: aload 3
      // 1d: invokeinterface java/util/Collection.isEmpty ()Z 1
      // 22: ifeq 32
      // 25: goto 2c
      // 28: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 2b: athrow
      // 2c: aload 2
      // 2d: areturn
      // 2e: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 31: athrow
      // 32: aload 3
      // 33: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 38: astore 4
      // 3a: aload 4
      // 3c: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 41: ifeq 5e
      // 44: aload 4
      // 46: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 4b: checkcast com/l7tech/gateway/common/service/ServiceStatistics
      // 4e: astore 5
      // 50: aload 2
      // 51: aload 5
      // 53: aload 1
      // 54: invokestatic com/l7tech/gateway/common/cluster/ServiceUsage.fromStat (Lcom/l7tech/gateway/common/service/ServiceStatistics;Ljava/lang/String;)Lcom/l7tech/gateway/common/cluster/ServiceUsage;
      // 57: invokevirtual java/util/ArrayList.add (Ljava/lang/Object;)Z
      // 5a: pop
      // 5b: goto 3a
      // 5e: aload 2
      // 5f: areturn
      // try (10 -> 15): 16 org/hibernate/HibernateException
      // try (12 -> 20): 20 org/hibernate/HibernateException
   }

   void a(Supplier<ServiceCache> var1) {
      this.p = var1;
   }

   @Override
   public boolean isEnabled() {
      return this.o.get();
   }

   @Override
   public void propertyChange(PropertyChangeEvent var1) {
      try {
         if (v[8].equals(var1.getPropertyName())) {
            this.a();
         }
      } catch (HibernateException var2) {
         throw a(var2);
      }
   }

   @Override
   public void onApplicationEvent(ApplicationEvent var1) {
      try {
         if (var1 instanceof ReadyForMessages) {
            this.a();
            return;
         }
      } catch (HibernateException var3) {
         throw a(var3);
      }

      try {
         if (var1 instanceof Stopping) {
            this.b();
         }
      } catch (HibernateException var2) {
         throw a(var2);
      }
   }

   private void a() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.q Lcom/l7tech/util/Config;
      // 04: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 07: astore 3
      // 08: aload 3
      // 09: bipush 8
      // 0b: aaload
      // 0c: ldc2_w 300000
      // 0f: invokeinterface com/l7tech/util/Config.getTimeUnitProperty (Ljava/lang/String;J)J 4
      // 14: lstore 1
      // 15: lload 1
      // 16: lconst_0
      // 17: lcmp
      // 18: ifne 24
      // 1b: aload 0
      // 1c: invokevirtual com/l7tech/server/cluster/MysqlServiceUsageManager.b ()V
      // 1f: return
      // 20: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 23: athrow
      // 24: aload 0
      // 25: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 28: ifnull 3a
      // 2b: aload 0
      // 2c: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 2f: invokevirtual com/l7tech/server/cluster/aa.cancel ()Z
      // 32: pop
      // 33: goto 3a
      // 36: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 39: athrow
      // 3a: aload 0
      // 3b: new com/l7tech/server/cluster/aa
      // 3e: dup
      // 3f: aload 0
      // 40: aload 0
      // 41: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.s Lorg/springframework/context/ApplicationContext;
      // 44: aload 0
      // 45: invokevirtual com/l7tech/server/cluster/MysqlServiceUsageManager.getHibernateTemplate ()Lorg/springframework/orm/hibernate5/HibernateTemplate;
      // 48: aload 0
      // 49: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.u Lorg/springframework/transaction/PlatformTransactionManager;
      // 4c: aload 0
      // 4d: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.n Ljava/lang/String;
      // 50: invokespecial com/l7tech/server/cluster/aa.<init> (Lcom/l7tech/server/cluster/MysqlServiceUsageManager;Lorg/springframework/context/ApplicationContext;Lorg/springframework/orm/hibernate5/HibernateTemplate;Lorg/springframework/transaction/PlatformTransactionManager;Ljava/lang/String;)V
      // 53: putfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 56: lload 1
      // 57: ldc2_w 4000
      // 5a: lcmp
      // 5b: iflt 83
      // 5e: lload 1
      // 5f: ldc2_w 86400000
      // 62: lcmp
      // 63: ifgt 83
      // 66: goto 6d
      // 69: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 6c: athrow
      // 6d: aload 0
      // 6e: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.t Lcom/l7tech/server/util/ManagedTimer;
      // 71: aload 0
      // 72: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 75: ldc2_w 8053
      // 78: lload 1
      // 79: invokevirtual com/l7tech/server/util/ManagedTimer.schedule (Ljava/util/TimerTask;JJ)V
      // 7c: goto a2
      // 7f: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 82: athrow
      // 83: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.a Ljava/util/logging/Logger;
      // 86: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 89: getstatic com/l7tech/server/cluster/MysqlServiceUsageManager.v [Ljava/lang/String;
      // 8c: bipush 4
      // 8d: aaload
      // 8e: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;)V
      // 91: aload 0
      // 92: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.t Lcom/l7tech/server/util/ManagedTimer;
      // 95: aload 0
      // 96: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 99: ldc2_w 8053
      // 9c: ldc2_w 4000
      // 9f: invokevirtual com/l7tech/server/util/ManagedTimer.schedule (Ljava/util/TimerTask;JJ)V
      // a2: aload 0
      // a3: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.o Ljava/util/concurrent/atomic/AtomicBoolean;
      // a6: bipush 1
      // a7: invokevirtual java/util/concurrent/atomic/AtomicBoolean.set (Z)V
      // aa: return
      // try (10 -> 17): 17 org/hibernate/HibernateException
      // try (19 -> 26): 27 org/hibernate/HibernateException
      // try (29 -> 51): 52 org/hibernate/HibernateException
      // try (47 -> 62): 62 org/hibernate/HibernateException
   }

   private void b() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.o Ljava/util/concurrent/atomic/AtomicBoolean;
      // 04: invokevirtual java/util/concurrent/atomic/AtomicBoolean.get ()Z
      // 07: ifeq 59
      // 0a: aload 0
      // 0b: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 0e: ifnull 27
      // 11: goto 18
      // 14: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 17: athrow
      // 18: aload 0
      // 19: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 1c: invokevirtual com/l7tech/server/cluster/aa.cancel ()Z
      // 1f: pop
      // 20: goto 27
      // 23: invokestatic com/l7tech/server/cluster/MysqlServiceUsageManager.a (Lorg/hibernate/HibernateException;)Lorg/hibernate/HibernateException;
      // 26: athrow
      // 27: aload 0
      // 28: new com/l7tech/server/cluster/aa
      // 2b: dup
      // 2c: aload 0
      // 2d: aload 0
      // 2e: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.s Lorg/springframework/context/ApplicationContext;
      // 31: aload 0
      // 32: invokevirtual com/l7tech/server/cluster/MysqlServiceUsageManager.getHibernateTemplate ()Lorg/springframework/orm/hibernate5/HibernateTemplate;
      // 35: aload 0
      // 36: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.u Lorg/springframework/transaction/PlatformTransactionManager;
      // 39: aload 0
      // 3a: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.n Ljava/lang/String;
      // 3d: invokespecial com/l7tech/server/cluster/aa.<init> (Lcom/l7tech/server/cluster/MysqlServiceUsageManager;Lorg/springframework/context/ApplicationContext;Lorg/springframework/orm/hibernate5/HibernateTemplate;Lorg/springframework/transaction/PlatformTransactionManager;Ljava/lang/String;)V
      // 40: putfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 43: aload 0
      // 44: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.t Lcom/l7tech/server/util/ManagedTimer;
      // 47: aload 0
      // 48: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.r Lcom/l7tech/server/cluster/aa;
      // 4b: ldc2_w 100
      // 4e: invokevirtual com/l7tech/server/util/ManagedTimer.schedule (Ljava/util/TimerTask;J)V
      // 51: aload 0
      // 52: getfield com/l7tech/server/cluster/MysqlServiceUsageManager.o Ljava/util/concurrent/atomic/AtomicBoolean;
      // 55: bipush 0
      // 56: invokevirtual java/util/concurrent/atomic/AtomicBoolean.set (Z)V
      // 59: return
      // try (0 -> 7): 8 org/hibernate/HibernateException
      // try (4 -> 14): 15 org/hibernate/HibernateException
   }

   private void c() {
      long var1 = this.q.getTimeUnitProperty(v[20], 300000L);

      try {
         if (var1 == 0L) {
            this.o.set(false);
            return;
         }
      } catch (HibernateException var3) {
         throw a(var3);
      }

      this.o.set(true);
   }

   static {
      String[] var5 = new String[21];
      int var3 = 0;
      String var2 = "}LOZE\u001c@QW\u001aDD_ALG\u001aEDNXW@_\u0016TOOYF%\u001etrssy\u000eMFH@H_KaVIWFY\u0000PL^SHX\u000e\u0003\u0003\u0000XNXKWG.}LOZE\u001c@QW\u001aUMYOL\u0003_NHOZWM]\u0016RY\\HJYS\u0001I]_D_\u0016SYMQQ^E\u001cxqu{\u0001OKLUSUDc[MB]S\u0001u`\u001e`vwro\u000eewMLWMUJ\u001eSHYQY\\JZ\u001a@@P[[\u0003MWR\u001cKPW_DDX\u000eXLH\u0016RY\\HJYStOOYF\u0014CQXOJFsXUY\\HBV\u0018\u0001i]WM]\u0016LU@WNO[\u0001JORV_\u0016NZ\u000e\n\u0003ISBS@ZP\u0014\rMFH@H_KaVIWFY(}LOZE\u001c@QW\u001aDDH\\WFLS\u0001OKLUSUD\u001c[MB]S\u0001NK]LHRR\u001cxqu{\u0001OKLUSUDc[MB]S\u0001u`\u001e`vwro\u000e\u001bMFH@H_KkP[QD\u0012[NG[BDu@JFH@@P\u0006PL^SHX6\u001ebi\u0016RY\\HJYS~I]_D_\u0016vtklf\u001aEDNXW@_iTOOYF\u0014XNXKWG\u001a\u000b\u0001\u0006@QG__E\tMFH@H_KWG:}LOZER\tJ\u0003HSUNG[U_\u0016RY\\HJYS\u0001I]_D_\u0016SYMQQ^E\u0001ZAL\u0003ISSJG]F\u001aQNUJ\u0004\u0003\u0006PL^SHX4}LOZER\tJ\u0003HSUNG[U_\u0016RY\\HJYS\u0001I]_D_\u0016SYMQQ^E\u0001ZAL\u0003TYEYgZ\u0019\u001a\tMFH@H_KWG\u001d\u001etrssy\u000eMFH@H_KWG\u001a\u000b\u0001\u0006][QL_BYGZ\u0016SBTWFYJ|BY]FNAKM^bHQKL\fzfvsuy\u000exqu{\u0001";
      int var4 = "}LOZE\u001c@QW\u001aDD_ALG\u001aEDNXW@_\u0016TOOYF%\u001etrssy\u000eMFH@H_KaVIWFY\u0000PL^SHX\u000e\u0003\u0003\u0000XNXKWG.}LOZE\u001c@QW\u001aUMYOL\u0003_NHOZWM]\u0016RY\\HJYS\u0001I]_D_\u0016SYMQQ^E\u001cxqu{\u0001OKLUSUDc[MB]S\u0001u`\u001e`vwro\u000eewMLWMUJ\u001eSHYQY\\JZ\u001a@@P[[\u0003MWR\u001cKPW_DDX\u000eXLH\u0016RY\\HJYStOOYF\u0014CQXOJFsXUY\\HBV\u0018\u0001i]WM]\u0016LU@WNO[\u0001JORV_\u0016NZ\u000e\n\u0003ISBS@ZP\u0014\rMFH@H_KaVIWFY(}LOZE\u001c@QW\u001aDDH\\WFLS\u0001OKLUSUD\u001c[MB]S\u0001NK]LHRR\u001cxqu{\u0001OKLUSUDc[MB]S\u0001u`\u001e`vwro\u000e\u001bMFH@H_KkP[QD\u0012[NG[BDu@JFH@@P\u0006PL^SHX6\u001ebi\u0016RY\\HJYS~I]_D_\u0016vtklf\u001aEDNXW@_iTOOYF\u0014XNXKWG\u001a\u000b\u0001\u0006@QG__E\tMFH@H_KWG:}LOZER\tJ\u0003HSUNG[U_\u0016RY\\HJYS\u0001I]_D_\u0016SYMQQ^E\u0001ZAL\u0003ISSJG]F\u001aQNUJ\u0004\u0003\u0006PL^SHX4}LOZER\tJ\u0003HSUNG[U_\u0016RY\\HJYS\u0001I]_D_\u0016SYMQQ^E\u0001ZAL\u0003TYEYgZ\u0019\u001a\tMFH@H_KWG\u001d\u001etrssy\u000eMFH@H_KWG\u001a\u000b\u0001\u0006][QL_BYGZ\u0016SBTWFYJ|BY]FNAKM^bHQKL\fzfvsuy\u000exqu{\u0001"
         .length();
      char var1 = 30;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 93;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var9 = a(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var9;
                  if ((var7 += var1) >= var4) {
                     v = var5;
                     String[] var10 = v;
                     f = v[5];
                     g = var10[13];
                     h = var10[11];
                     a = Logger.getLogger(MysqlServiceUsageManager.class.getName());
                     String var11 = ServiceUsage.class.getName();
                     String[] var8 = v;
                     i = var8[7] + var11 + var8[1];
                     j = var8[18] + ServiceUsage.class.getName() + var8[10];
                     k = var8[3] + ServiceUsage.class.getName();
                     l = var8[3] + ServiceUsage.class.getName() + var8[16];
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var9;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "\u001e\u0005\u000f\f\u0006\t\u0019\u001e\u001e\u0001\f8\t\u0014\u000b\u0010\u000b\u0010\u001b\u0019\u0012\u001c\u0014\u001c\u000b\u001f?\u0004\u000f\u0005\u0010F\u000f\u001a\u0013\u000f\u0016\u0010!\u0014\u001e\u0012\u001c\u0014\u0014\u0004";
                  var4 = "\u001e\u0005\u000f\f\u0006\t\u0019\u001e\u001e\u0001\f8\t\u0014\u000b\u0010\u000b\u0010\u001b\u0019\u0012\u001c\u0014\u001c\u000b\u001f?\u0004\u000f\u0005\u0010F\u000f\u001a\u0013\u000f\u0016\u0010!\u0014\u001e\u0012\u001c\u0014\u0014\u0004"
                     .length();
                  var1 = 18;
                  var7 = -1;
            }

            var10000 = 9;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

   private static HibernateException a(HibernateException var0) {
      return var0;
   }

   private static char[] a(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 115);
      }

      return var10000;
   }

   private static String a(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 99;
            case 1 -> 126;
            case 2 -> 103;
            case 3 -> 107;
            case 4 -> 124;
            case 5 -> 97;
            default -> 115;
         });
      }

      return new String(var10001).intern();
   }
}
