class SlaveLocksClient implements Locks.Client {

    @Override
    public void acquireExclusive( LockTracer tracer, ResourceType resourceType, long... resourceIds ) throws
            AcquireLockTimeoutException
    {
        assertNotStopped();

        long[] newResourceIds = firstTimeExclusiveLocks( resourceType, resourceIds );
        if ( newResourceIds.length > 0 )
        {
            try ( LockWaitEvent event = tracer.waitForLock( true, resourceType, newResourceIds ) )
            {
                acquireExclusiveOnMaster( resourceType, newResourceIds );
            }
            catch ( Throwable failure )
            {
                if ( resourceIds != newResourceIds )
                {
                    releaseExclusive( resourceType, resourceIds, newResourceIds );
                }
                throw failure;
            }
            for ( long resourceId : newResourceIds )
            {
                if ( !client.tryExclusiveLock( resourceType, resourceId ) )
                {
                    throw new LocalDeadlockDetectedException(
                            client, localLockManager, resourceType, resourceId, WRITE );
                }
            }
        }
    }

      SlaveLocksClient( Master master, Locks.Client local, Locks localLockManager,
            RequestContextFactory requestContextFactory, AvailabilityGuard availabilityGuard, LogProvider logProvider );

}