Israel and Hamas, the ruling party of Gaza, are in a state of armed and under international maritime law under this state of armed conflict Israel can impose a blockade of all maritime traffic, including both civilian and non-civilian traffic.
Official Israeli foreign affairs position:
The Gaza flotilla and the maritime blockade of Gaza - Legal background
This flotilla had stated its intentions to break this blockade so there's nothing 'random' about it.
Comparing the ability to stop most traffic on the scale of Britain against Germany was not feasible based on the manpower and the resources required to fully block all traffic coming in and out of the country/territory in question. With the limited amount of coastline Gaza has, this is completely feasible in addition to advances in technology.
Not using the term effective in terms of finding anything. Its to minimize the ability to Hamas to wage war against Israel and to severely limit their supplies and financial lifelines regarding this ability.