class MasterImpl extends LifecycleAdapter implements Master {

    @Override
    public Response<LockResult> acquireSharedLock( RequestContext context, ResourceType type,
                                                   long... resourceIds )
    {
        assertCorrectEpoch( context );
        Locks.Client session;
        try
        {
            session = conversationManager.acquire( context ).getLocks();
        }
        catch ( NoSuchEntryException | ConcurrentAccessException e )
        {
            return spi.packTransactionObligationResponse( context, new LockResult(
                    LockStatus.NOT_LOCKED,
                    "Unable to acquire shared lock: " + e.getMessage() ) );
        }
        try
        {
            for ( long resourceId : resourceIds )
            {
                session.acquireShared( LockTracer.NONE, type, resourceId );
            }

            return spi.packTransactionObligationResponse( context, new LockResult( LockStatus.OK_LOCKED ) );
        }
        catch ( DeadlockDetectedException e )
        {
            return spi.packTransactionObligationResponse( context, new LockResult( LockStatus.DEAD_LOCKED, e.getMessage() ) );
        }
        catch ( IllegalResourceException e )
        {
            return spi.packTransactionObligationResponse( context, new LockResult(
                    LockStatus.NOT_LOCKED,
                    "Attempted to lock illegal resource: " + e.getMessage() ) );
        }
        finally
        {
            conversationManager.release( context );
        }
    }

    public  MasterImpl( SPI spi, ConversationManager conversationManager, Monitor monitor, Config config );

}