Package com.google.caliper.bridge
Class CommandLineSerializer
- java.lang.Object
-
- com.google.caliper.bridge.CommandLineSerializer
-
public final class CommandLineSerializer extends Object
Serializes and deserializesWorkerRequests as base64 encoded strings so they can be passed on the command line to the worker.Java serialization is a appropriate in this use-case because there are no compatibility concerns. The messages encoded/decoded by this class are only used to communicate with another JVM that is running with the same version of the java classes. Also, it should be lighter weight and faster than other common serialization solutions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkerRequestparse(String arg)Parses the given base64 encoded string as an object of the given type.static Stringrender(WorkerRequest message)Returns the given serializable object as a base64 encoded String.
-
-
-
Method Detail
-
render
public static String render(WorkerRequest message)
Returns the given serializable object as a base64 encoded String.
-
parse
public static WorkerRequest parse(String arg)
Parses the given base64 encoded string as an object of the given type.
-
-