import akka.dispatch.Futures;
import akka.pattern.Patterns;
import akka.testkit.javadsl.TestKit;
-import com.google.common.base.Optional;
import com.google.common.base.Stopwatch;
import com.google.common.base.Supplier;
import com.google.common.base.Throwables;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
+import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
initDatastoresWithCars("testReadyLocalTransactionForwardedToLeader");
followerTestKit.waitUntilLeader(followerDistributedDataStore.getActorContext(), "cars");
- final Optional<ActorRef> carsFollowerShard = followerDistributedDataStore.getActorContext()
- .findLocalShard("cars");
+ final com.google.common.base.Optional<ActorRef> carsFollowerShard =
+ followerDistributedDataStore.getActorContext().findLocalShard("cars");
assertEquals("Cars follower shard found", true, carsFollowerShard.isPresent());
final DataTree dataTree = new InMemoryDataTreeFactory().create(
initDatastoresWithCars("testForwardedReadyTransactionForwardedToLeader");
followerTestKit.waitUntilLeader(followerDistributedDataStore.getActorContext(), "cars");
- final Optional<ActorRef> carsFollowerShard = followerDistributedDataStore.getActorContext()
- .findLocalShard("cars");
+ final com.google.common.base.Optional<ActorRef> carsFollowerShard =
+ followerDistributedDataStore.getActorContext().findLocalShard("cars");
assertEquals("Cars follower shard found", true, carsFollowerShard.isPresent());
carsFollowerShard.get().tell(GetShardDataTree.INSTANCE, followerTestKit.getRef());
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
- readTx.read(CarsModel.BASE_PATH).checkedGet(5, TimeUnit.SECONDS);
+ readTx.read(CarsModel.BASE_PATH).get(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
- readTx.read(CarsModel.BASE_PATH).checkedGet(5, TimeUnit.SECONDS);
+ readTx.read(CarsModel.BASE_PATH).get(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
- readTx.read(CarsModel.BASE_PATH).checkedGet(5, TimeUnit.SECONDS);
+ readTx.read(CarsModel.BASE_PATH).get(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
initDatastoresWithCars(testName);
final Optional<NormalizedNode<?, ?>> readOptional = leaderDistributedDataStore.newReadOnlyTransaction().read(
- CarsModel.BASE_PATH).checkedGet(5, TimeUnit.SECONDS);
+ CarsModel.BASE_PATH).get(5, TimeUnit.SECONDS);
assertEquals("isPresent", true, readOptional.isPresent());
assertEquals("Node", carsNode, readOptional.get());