public Transaction startShort ( int timeoutInSeconds ) { Preconditions . checkArgument ( timeoutInSeconds > 0 , "timeout must be positive but is %s" , timeoutInSeconds ) ; txMetricsCollector . rate ( "start.short" ) ; Stopwatch timer = new Stopwatch ( ) . start ( ) ; long expiration = getTxExpiration ( timeoutInSeconds ) ; Transaction tx = startTx ( expiration , TransactionType . SHORT ) ; txMetricsCollector . histogram ( "start.short.latency" , ( int ) timer . elapsedMillis ( ) ) ; return tx ; }
Start a short transaction with a given timeout .