class TransactionDependenciesResolver {

    public String describeBlockingTransactions( KernelTransactionHandle handle  )
    {
        Set<KernelTransactionHandle> allBlockers = new TreeSet<>(
                Comparator.comparingLong( KernelTransactionHandle::getUserTransactionId ) );
        Set<KernelTransactionHandle> handles = directDependencies.get( handle );
        if ( handles != null )
        {
            Deque<KernelTransactionHandle> blockerQueue = new ArrayDeque<>( handles );
            while ( !blockerQueue.isEmpty() )
            {
                KernelTransactionHandle transactionHandle = blockerQueue.pop();
                if ( allBlockers.add( transactionHandle ) )
                {
                    Set<KernelTransactionHandle> transactionHandleSet = directDependencies.get( transactionHandle );
                    if ( transactionHandleSet != null )
                    {
                        blockerQueue.addAll( transactionHandleSet );
                    }
                }
            }
        }
        return describe( allBlockers );
    }

      TransactionDependenciesResolver( Map<KernelTransactionHandle,List<QuerySnapshot>> handleSnapshotsMap );

}