private void doRegisterStore(String storeName, Scope scope, boolean b)
throws SyncException{
ensureConnected();
RegisterRequestMessage rrm = new RegisterRequestMessage();
AsyncMessageHeader header = new AsyncMessageHeader();
header.setTransactionId(getTransactionId());
rrm.setHeader(header);
Store store = new Store(storeName);
store.setScope(TProtocolUtil.getTScope(scope));
store.setPersist(false);
rrm.setStore(store);
SyncMessage bsm = new SyncMessage(MessageType.REGISTER_REQUEST);
bsm.setRegisterRequest(rrm);
Future<SyncReply> future =
sendRequest(header.getTransactionId(), bsm);
try {
future.get(5, TimeUnit.SECONDS);
} catch (TimeoutException e) {
throw new RemoteStoreException("Timed out on operation", e);
} catch (Exception e) {