class SerializerProcessor extends MonitoredProcess {

  public String serialize(Object obj) throws SerializationException {
    this.getRuntimeStat().start();
    String serialized;
    try {
      serialized = this.serializer.serialize(obj);
    } catch (Exception e) {
      this.getErrorCountStat().increment();
      throw new SerializationException(e);
    } finally {
      this.getRuntimeStat().stop();
    }

    this.getSuccessCountStat().increment();

    return serialized;
  }

  public  SerializerProcessor(Serializer serializer);
  public  SerializerProcessor(Class<? extends SerializerFactory> clazz);

}