1. If, without sufficient excuse, a principal does not appear when required or does not render himself amenable to the orders and processes of the criminal court wherein bail has been posted, the court must enter such facts upon its minutes and the bail bond or the cash bail, as the case may be, is thereupon forfeited.2. If the principal appears at any time before the final adjournment of the court, and satisfactorily excuses his neglect, the court may direct the forfeiture to be discharged upon such terms as are just. If the forfeiture is not so discharged and the forfeited bail consisted of a bail bond, the district attorney, within one hundred twenty days after the adjournment of the court at which such bond was directed to be forfeited, must proceed against the obligor or obligors who executed such bond, in the manner prescribed in subdivision three. If the forfeited bail consisted of cash bail, the county treasurer with whom it is deposited shall give written notice of the forfeiture to the person who posted cash bail for the defendant may at any time after the final adjournment of the court or forty-five days after notice of forfeiture required herein has been given, whichever comes later, apply the money deposited to the use of the county.3. A bail bond or cash bail, upon being forfeited, together with a certified copy of the order of the court forfeiting the same, must be filed by the district attorney in the office of the clerk of the county wherein such order was issued. Such clerk must docket the same in the book kept by him for docketing of judgments and enter therein a judgment against the obligor or obligors who executed such bail bond for the amount of the penalty of said bond or against the person who posted the cash bail for the amount of the cash bail, and the bond and the certified copy of the order of the court forfeiting the bond or the cash bail constitutes the judgment roll. Such judgment constitutes a lien on the real estate of the obligor or obligors who executed such bail bond from the time of the entry of the judgment. An execution may be issued to collect the amount of said bail bond in the same form and with the same effect as upon a judgment recovered in an action in said county upon a debt in favor of the people of the state of New York against such obligor or obligors.