main
public static void main(String[] args)
Implements the following transactions each with the Java type methods and
the erlang (OTP) type methods. The keys and values are given on the
command line as "key1 value1 key2 value2 key3".
If no values are given, the default values
(key1, value1) = ("key1", "value1")
,
(key2, value2) = ("key2", "value2")
and key3 = "key3"
are
used.
Transaction 1:
write(key1, value1);
write(key2, value2);
result1 = read(key1);
result2 = read(key2);
result3 = read(key3);
write(key3, result1 + result2);
result3 = read(key3);
commit();
Transaction 2:
write(key1, value1);
commit();
write(key1, "WRONG value");
read(key1);
abort();
read(key1);
commit();
- Parameters:
args
- command line arguments with the structure "key1 value1 key2
value2 key3"
- See Also:
Transaction1(String, String, String, String, String)
,
Transaction2(String, String, String, String, String)