For the terrine, place the ham hocks into a deep saucepan with the onion, carrot, peppercorns, salt and herbs. Cover with water and bring to the boil, then reduce the heat and simmer for two hours. Remove from the heat and allow to cool.
Take the ham hocks out of the pan and set aside. Strain the cooking liquor through a fine sieve and pour 250ml/9fl oz of it into a saucepan (the rest could be saved and used as a soup base.)
Bring a saucepan of water to the boil. Place the spring onions into a steamer set over the pan and steam for five minutes, or until just tender. Remove from the steamer and allow to cool.
Place the gelatine leaves into a bowl of cold water and soak for five minutes until pliable, then drain.
Bring the reserved 250ml/9fl oz cooking liquor to a simmer and stir in the soaked gelatine. Whisk until the gelatine has dissolved.
Remove the ham from the bones and cut into 2.5cm/1in thick slices. Line a terrine mould with a large piece of cling film and spread half of the ham over the base.
Spread the spring onions over the ham, then top with the remaining ham.
Pour the gelatine mixture over the ham and give the mould a gentle tap to settle the contents and remove air pockets.
Fold the cling film over the terrine and place two tins on top to weigh it down. Place in the fridge for at least two hours, or until set.
For the pickled marrow, place the vinegar and sugar into a saucepan and bring to the boil. Remove from the heat.
Heat the olive oil in a frying pan and add the mustard seeds and chilli flakes. Stir fry for one minute, until the seeds start to pop.
Add the marrow and fry for 2-3 minutes, or until softened. Season, to taste, with salt and freshly ground black pepper.
Place the marrow into a bowl, pour over the vinegar mixture and stir well. Allow to cool completely, then place into the fridge. The pickled marrow will keep for several days in the fridge if stored in sealed sterilised jars.
To serve, remove the cling film from the terrine and cut the terrine into slices. Place onto serving plates with a spoonful of the pickled marrow, drained from its vinegar.