public deleteAllTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tableName = tableName; this.row = row; this.column = column; this.timestamp = timestamp; this.attributes = attributes; }
@Test public void unremoveProject() throws Exception { doAnswer(invocation -> { final AsyncMethodCallback<Void> callback = invocation.getArgument(1); callback.onComplete(null); return null; }).when(iface).unremoveProject(any(), any()); assertThat(client.unremoveProject("project").get()).isNull(); verify(iface).unremoveProject(eq("project"), any()); }
@Test public void unremoveRepository() throws Exception { doAnswer(invocation -> { final AsyncMethodCallback<Void> callback = invocation.getArgument(2); callback.onComplete(null); return null; }).when(iface).unremoveRepository(anyString(), anyString(), any()); assertThat(client.unremoveRepository("project", "repo").get()).isNull(); verify(iface).unremoveRepository(eq("project"), eq("repo"), any()); }
@Test public void listRemovedRepositories() throws Exception { doAnswer(invocation -> { final AsyncMethodCallback<Set<String>> callback = invocation.getArgument(1); callback.onComplete(ImmutableSet.of("repo")); return null; }).when(iface).listRemovedRepositories(any(), any()); assertThat(client.listRemovedRepositories("project").get()).isEqualTo(ImmutableSet.of("repo")); verify(iface).listRemovedRepositories(anyString(), any()); }
@Test public void getFiles() throws Exception { doAnswer(invocation -> { final AsyncMethodCallback<List<TEntry>> callback = invocation.getArgument(4); final TEntry entry = new TEntry("/b.txt", TEntryType.TEXT); entry.setContent("world"); callback.onComplete(ImmutableList.of(entry)); return null; }).when(iface).getFiles(anyString(), anyString(), any(), anyString(), any()); assertThat(client.getFiles("project", "repo", new Revision(1), "path").get()) .isEqualTo(ImmutableMap.of("/b.txt", Entry.ofText("/b.txt", "world"))); verify(iface).getFiles(anyString(), anyString(), any(), anyString(), any()); }
@Override public void listProjects(AsyncMethodCallback resultHandler) { handle(() -> { final Map<String, com.linecorp.centraldogma.server.internal.storage.project.Project> projects = projectManager.list(); final List<Project> ret = new ArrayList<>(projects.size()); projects.forEach((key, value) -> ret.add(convert(key, value))); return ret; }, resultHandler); }
public mutateRow_call(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tableName = tableName; this.row = row; this.mutations = mutations; this.attributes = attributes; }
public getRowsWithColumnsTs_call(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tableName = tableName; this.rows = rows; this.columns = columns; this.timestamp = timestamp; this.attributes = attributes; }
public getVerTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tableName = tableName; this.row = row; this.column = column; this.timestamp = timestamp; this.numVersions = numVersions; this.attributes = attributes; }
public test_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; }
public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); scannerOpenWithPrefix_call method_call = new scannerOpenWithPrefix_call(tableName, startAndPrefix, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void echo(String msg, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); echo_call method_call = new echo_call(msg, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void start(I iface, scannerClose_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.scannerClose(args.id,resultHandler); }
public void start(I iface, getRowTs_args args, org.apache.thrift.async.AsyncMethodCallback<List<TRowResult>> resultHandler) throws TException { iface.getRowTs(args.tableName, args.row, args.timestamp, args.attributes,resultHandler); }
public void start(I iface, compact_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.compact(args.tableNameOrRegionName,resultHandler); }
public void getRegionInfo(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getRegionInfo_call method_call = new getRegionInfo_call(row, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void start(I iface, getManagersStatus_args args, AsyncMethodCallback<String> resultHandler) throws TException { iface.getManagersStatus(resultHandler); }
public void start(I iface, enableTable_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.enableTable(args.tableName,resultHandler); }
public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); atomicIncrement_call method_call = new atomicIncrement_call(tableName, row, column, value, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); mutateRows_call method_call = new mutateRows_call(tableName, rowBatches, attributes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void getColumnDescriptors(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getColumnDescriptors_call method_call = new getColumnDescriptors_call(tableName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void start(I iface, closeScanner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.closeScanner(args.scannerId,resultHandler); }
public void start(I iface, addToBlackList_args args, AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.addToBlackList(args.taskId, resultHandler); }
public void sayHello(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); sayHello_call method_call = new sayHello_call(username, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void getOnlineUserNum(String ip, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getOnlineUserNum_call method_call = new getOnlineUserNum_call(ip, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); scannerOpenTs_call method_call = new scannerOpenTs_call(tableName, startRow, columns, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getRowWithColumnsTs_call method_call = new getRowWithColumnsTs_call(tableName, row, columns, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public void getFiltersStatus(AsyncMethodCallback resultHandler) throws TException { checkReady(); getFiltersStatus_call method_call = new getFiltersStatus_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
@Override public void unremoveProject(String name, AsyncMethodCallback resultHandler) { handle(executor.execute(Command.unremoveProject(SYSTEM, name)), resultHandler); }
public void start(I iface, deleteAllRow_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { iface.deleteAllRow(args.tableName, args.row, args.attributes,resultHandler); }
public increment_call(TIncrement increment, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.increment = increment; }
@Override public void removeRepository( String projectName, String repositoryName, AsyncMethodCallback resultHandler) { handle(executor.execute(Command.removeRepository(SYSTEM, projectName, repositoryName)), resultHandler); }
public void getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getRowsWithColumns_call method_call = new getRowsWithColumns_call(tableName, rows, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public mutateRows_call(ByteBuffer tableName, List<BatchMutation> rowBatches, Map<ByteBuffer,ByteBuffer> attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tableName = tableName; this.rowBatches = rowBatches; this.attributes = attributes; }
public void start(I iface, fetchMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<TSFetchMetadataResp> resultHandler) throws TException { iface.fetchMetadata(args.req,resultHandler); }
public void start(I iface, getScannerResults_args args, org.apache.thrift.async.AsyncMethodCallback<List<TResult>> resultHandler) throws TException { iface.getScannerResults(args.table, args.tscan, args.numRows,resultHandler); }
public void getTimeZone(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getTimeZone_call method_call = new getTimeZone_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); }
public fetchResults_call(TSFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; }
public void start(I iface, checkAndPut_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput,resultHandler); }