gpt4 book ai didi

com.qiniu.common.Zone.zoneNa0()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 11:02:40 25 4
gpt4 key购买 nike

本文整理了Java中com.qiniu.common.Zone.zoneNa0()方法的一些代码示例,展示了Zone.zoneNa0()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone.zoneNa0()方法的具体详情如下:
包路径:com.qiniu.common.Zone
类名称:Zone
方法名:zoneNa0

Zone.zoneNa0介绍

[英]北美机房相关域名
[中]北美机房相关域名

代码示例

代码示例来源:origin: Exrick/x-boot

/**
 * 构造一个带指定Zone对象的配置类 zone2华南
 */
public Configuration getConfiguration(){
  Configuration cfg = null;
  if(zone.equals(0)){
    cfg = new Configuration(Zone.zone0());
  }else if(zone.equals(1)){
    cfg = new Configuration(Zone.zone1());
  }else if(zone.equals(2)){
    cfg = new Configuration(Zone.zone2());
  }else if(zone.equals(3)){
    cfg = new Configuration(Zone.zoneNa0());
  }else if(zone.equals(4)){
    cfg = new Configuration(Zone.zoneAs0());
  }else {
    cfg = new Configuration(Zone.autoZone());
  }
  return cfg;
}

代码示例来源:origin: com.qiniu/qiniu-java-sdk

/**
 * 北美机房相关域名
 */
public static Zone beimei() {
  return zoneNa0();
}

代码示例来源:origin: qiniu/java-sdk

/**
 * 北美机房相关域名
 */
public static Zone beimei() {
  return zoneNa0();
}

代码示例来源:origin: elunez/eladmin

/**
 * 得到机房的对应关系
 * @param zone
 * @return
 */
public static Configuration getConfiguration(String zone){
  if(HUAD.equals(zone)){
    return new Configuration(Zone.zone0());
  } else if(HUAB.equals(zone)){
    return new Configuration(Zone.zone1());
  } else if(HUAN.equals(zone)){
    return new Configuration(Zone.zone2());
  } else if (BEIM.equals(zone)){
    return new Configuration(Zone.zoneNa0());
    // 否则就是东南亚
  } else {
    return new Configuration(Zone.zoneAs0());
  }
}

代码示例来源:origin: qiniu/java-sdk

@Test
public void testHello2() {
  Map<String, Zone> bucketKeyMap = new HashMap<String, Zone>();
  bucketKeyMap.put(TestConfig.testBucket_z0, Zone.zone0());
  bucketKeyMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());
  for (Map.Entry<String, Zone> entry : bucketKeyMap.entrySet()) {
    String bucket = entry.getKey();
    Zone zone = entry.getValue();
    Configuration c = new Configuration(zone);
    c.useHttpsDomains = true;
    UploadManager uploadManager = new UploadManager(c);
    hello(uploadManager, bucket);
  }
}

代码示例来源:origin: qiniu/java-sdk

Map<String, Zone> cases = new HashMap<String, Zone>();
cases.put(TestConfig.testBucket_z0, Zone.zone0());
cases.put(TestConfig.testBucket_na0, Zone.zoneNa0());
cases.put(TestConfig.testBucket_z0, Zone.autoZone());
cases.put(TestConfig.testBucket_na0, Zone.autoZone());

代码示例来源:origin: qiniu/java-sdk

public void testFormLargeSize2() {
  Map<String, Zone> bucketKeyMap = new HashMap<String, Zone>();
  bucketKeyMap.put(TestConfig.testBucket_z0, Zone.zone0());
  bucketKeyMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());
  for (Map.Entry<String, Zone> entry : bucketKeyMap.entrySet()) {
    String bucket = entry.getKey();

代码示例来源:origin: qiniu/java-sdk

public void testFormLargeSize() {
  Map<String, Zone> bucketKeyMap = new HashMap<String, Zone>();
  bucketKeyMap.put(TestConfig.testBucket_z0, Zone.zone0());
  bucketKeyMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());
  for (Map.Entry<String, Zone> entry : bucketKeyMap.entrySet()) {
    String bucket = entry.getKey();
    Zone zone = entry.getValue();
    Configuration c = new Configuration(zone);
    c.putThreshold = 25 * 1024 * 1024;
    UploadManager uploadManager = new UploadManager(new Configuration(Zone.zone0()));
    final String expectKey = "yyyyyy";
    File f = null;
    try {
      f = TempFile.createFile(c.putThreshold / 1024 - 1);
    } catch (IOException e) {
      e.printStackTrace();
    }
    String token = TestConfig.testAuth.uploadToken(bucket, expectKey);
    Response r = null;
    try {
      r = uploadManager.put(f, expectKey, token, null, null, false);
    } catch (QiniuException e) {
      try {
        assertEquals("_", e.response.bodyString());
      } catch (QiniuException e1) {
        e1.printStackTrace();
      }
    }
  }
}

代码示例来源:origin: qiniu/java-sdk

private void template(int size, boolean https) throws IOException {
  Map<String, Zone> bucketZoneMap = new HashMap<String, Zone>();
  bucketZoneMap.put(TestConfig.testBucket_z0, Zone.zone0());
  bucketZoneMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());

代码示例来源:origin: qiniu/java-sdk

Map<String, Zone> bucketZoneMap = new HashMap<String, Zone>();
bucketZoneMap.put(TestConfig.testBucket_z0, Zone.zone0());
bucketZoneMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());

代码示例来源:origin: qiniu/java-sdk

private void template(int size, boolean https) throws IOException {
  Map<String, Zone> bucketKeyMap = new HashMap<String, Zone>();
  bucketKeyMap.put(TestConfig.testBucket_z0, Zone.zone0());
  bucketKeyMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());
  for (Map.Entry<String, Zone> entry : bucketKeyMap.entrySet()) {
    String bucket = entry.getKey();

代码示例来源:origin: qiniu/java-sdk

bucketKeyMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());
for (Map.Entry<String, Zone> entry : bucketKeyMap.entrySet()) {
  String bucket = entry.getKey();

代码示例来源:origin: qiniu/java-sdk

@Before
  public void setUp() throws Exception {
    //default config
    Configuration cfg = new Configuration();
    cfg.useHttpsDomains = false;
//        cfg.useHttpsDomains = true;
    this.bucketManager = new BucketManager(TestConfig.testAuth, cfg);

    //na0 config
    Configuration cfgNa0 = new Configuration(Zone.zoneNa0());
    this.bucketManagerNa0 = new BucketManager(TestConfig.testAuth, cfgNa0);

    //dummy config
    this.dummyBucketManager = new BucketManager(TestConfig.dummyAuth, new Configuration());
  }

代码示例来源:origin: qiniu/java-sdk

private void template(final int size) throws IOException {
  Map<String, Zone> bucketKeyMap = new HashMap<String, Zone>();
  bucketKeyMap.put(TestConfig.testBucket_z0, Zone.zone0());
  bucketKeyMap.put(TestConfig.testBucket_na0, Zone.zoneNa0());
  for (Map.Entry<String, Zone> entry : bucketKeyMap.entrySet()) {
    String bucket = entry.getKey();

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com