Shamed Irish judge sentenced to four years in prison for sex