As always, it is vitally important to be aware of who the speaker is in this particular section of Act II scene 5, and in addition, to be aware of who he or she is speaking to, and also how it fits into the plot of the play as a whole. The person who bids "the doors be locked" is Shylock, and he is issuing an order to his daughter, Jessica, based on the information that has just been supplied to him by Launcelot. Launcelot has just informed him that there is due to be a masque that night, a festival of revelry and drunken behaviour, involving loud noise, music and costumes on the streets of Venice. It is in response to this that Shylock commands Jessica to do the following:

What, are there masques? Hear you me, Jessica.

Lock up my doors, and when you hear the drum

And the vile squealing of the wry-necked fife,

Clamber not you up to the casements then,

Nor thrust your head into the public street...

Note how Shylock repeats the news about there being masques that evening, and then turns to address his daughter with specific advice. The doors need to be locked in order to shut out the "vile squealing" and the sound of music and revelry that would accompany these masques. The order that Shylock gives shows that he wishes to keep his daughter away from any such exposure to the antics of these "Christian fools," and, just like his money, he wants to keep her locked up and safe from Christian influences that he is so opposed to. This section therefore signals as much of a culture clash between Christians and Jews as it does an protective father who will stop at nothing to keep his daughter safe and sound (in his opinion) from any dangerous influences. Note how he is imperious in his use of the imperative "Clamber not..." when he firmly tells Jessica she must not go up to the windows and look out, in case she sees the masques (since they had their roots in and a continuing connection to the ancient mythology of Greek and Roman gods) and is also seen herself. This speech reinforces earlier impressions that have already been created of a man who is so serious and joyless that he insists everybody in his house shares his somewhat bleak and desolate existence. Small wonder, therefore, that Launcelot has already left his employment and Jessica, his daughter, is so desperate to elope.