Java 类org.apache.thrift.async.AsyncMethodCallback 实例源码

项目:ditb    文件:Hbase.java   
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;
}
项目:centraldogma    文件:DefaultCentralDogmaTest.java   
@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());
}
项目:centraldogma    文件:DefaultCentralDogmaTest.java   
@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());
}
项目:centraldogma    文件:DefaultCentralDogmaTest.java   
@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());
}
项目:centraldogma    文件:DefaultCentralDogmaTest.java   
@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());
}
项目:centraldogma    文件:CentralDogmaServiceImpl.java   
@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);
}
项目:ditb    文件:Hbase.java   
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;
}
项目:ditb    文件:Hbase.java   
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;
}
项目:ditb    文件:Hbase.java   
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;
}
项目:high    文件:ThriftTestService.java   
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;
}
项目:ditb    文件:Hbase.java   
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);
}
项目:albedo-thrift    文件:EchoSerivce.java   
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);
}
项目:ditb    文件:Hbase.java   
public void start(I iface, scannerClose_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
  iface.scannerClose(args.id,resultHandler);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:Hbase.java   
public void start(I iface, compact_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
  iface.compact(args.tableNameOrRegionName,resultHandler);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:Cobweb    文件:LocalWorkerCrawlerServiceBase.java   
public void start(I iface, getManagersStatus_args args, AsyncMethodCallback<String> resultHandler) throws TException {
    iface.getManagersStatus(resultHandler);
}
项目:ditb    文件:Hbase.java   
public void start(I iface, enableTable_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
  iface.enableTable(args.tableName,resultHandler);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:THBaseService.java   
public void start(I iface, closeScanner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
  iface.closeScanner(args.scannerId,resultHandler);
}
项目:Cobweb    文件:LocalWorkerCrawlerServiceBase.java   
public void start(I iface, addToBlackList_args args, AsyncMethodCallback<Boolean> resultHandler) throws TException {
    iface.addToBlackList(args.taskId, resultHandler);
}
项目:Cobweb    文件:HelloWorldService.java   
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);
}
项目:albedo-thrift    文件:IPushManageService.java   
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);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:Cobweb    文件:LocalWorkerCrawlerServiceBase.java   
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);
}
项目:centraldogma    文件:CentralDogmaServiceImpl.java   
@Override
public void unremoveProject(String name, AsyncMethodCallback resultHandler) {
    handle(executor.execute(Command.unremoveProject(SYSTEM, name)), resultHandler);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:Hbase.java   
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;
}
项目:centraldogma    文件:CentralDogmaServiceImpl.java   
@Override
public void removeRepository(
        String projectName, String repositoryName, AsyncMethodCallback resultHandler) {
    handle(executor.execute(Command.removeRepository(SYSTEM, projectName, repositoryName)), resultHandler);
}
项目:ditb    文件:Hbase.java   
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);
}
项目:ditb    文件:Hbase.java   
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;
}
项目:iotdb-jdbc    文件:TSIService.java   
public void start(I iface, fetchMetadata_args args, org.apache.thrift.async.AsyncMethodCallback<TSFetchMetadataResp> resultHandler) throws TException {
  iface.fetchMetadata(args.req,resultHandler);
}
项目:ditb    文件:THBaseService.java   
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);
}
项目:iotdb-jdbc    文件:TSIService.java   
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);
}
项目:iotdb-jdbc    文件:TSIService.java   
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;
}
项目:ditb    文件:THBaseService.java   
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);
}