The Justices of the Superior Court and Judges of the District Court, in term time or in vacation, have power to cause all laws for the preservation of the public peace to be kept; and in the execution thereof may require persons to give security to keep the peace and be of good behavior, as provided.