@Override
            public void run() {
                AffinityLock al = null;
                try {
                    al = acquireLockBasedOnLast();
                } catch (final Throwable ignored) {
                    // Defensive: ignored error on acquiring lock
                }
                try {
                    r2.run();
                } finally {
                    if (al != null) {
                        try {
                            al.release();
                        } catch (final Throwable ignored) {
                            // Defensive: ignored error on releasing lock
                        }
                    }
                }
            }
This is a ThreadFactory which assigns threads based the strategies provided.

If no strategies are provided AffinityStrategies.ANY is used.

@author jiachun.fjc
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/concurrent/AffinityNamedThreadFactory.java