Public offenses may be prevented by the intervention of the officers of justice by:

(1) Requiring security to keep the peace; and
(2) Suppressing riots, unlawful assemblies and breaches of the peace.