Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to adapt a hot update to a GC #2504

Open
qq969505202 opened this issue Apr 25, 2024 · 1 comment
Open

How to adapt a hot update to a GC #2504

qq969505202 opened this issue Apr 25, 2024 · 1 comment
Labels
enhancement New feature or request suggestion A suggestion

Comments

@qq969505202
Copy link

I've got wet with a lot of methods, but it still didn't work, and the big guys asked for help.

@qq969505202 qq969505202 added enhancement New feature or request suggestion A suggestion labels Apr 25, 2024
@yunochan
Copy link

新建一个AreaInfo类,里面存放区服信息
public class AreaInfo {
public static class Resource {
public String resourceUrl = "";
public String dataUrl = "";
public String resourceUrlBak = "";
public int clientDataVersion = ;
public int clientSilenceDataVersion = ;
public String clientDataMd5 = "";
public String clientSilenceDataMd5 = "";
publicAreaInfo.ResVersionConfig resVersionConfig = newAreaInfo.ResVersionConfig();
public String clientVersionSuffix = "";
public String clientSilenceVersionSuffix = "";
public String nextResourceUrl = "";
public AreaInfo.ResVersionConfig nextResVersionConfig = new AreaInfo.ResVersionConfig();
}

public static class ResVersionConfig {
public int version = ;
public String md5 = "";
public String releaseTotalSize = "";
public String versionSuffix = "";
public String branch = "";
}
}

在RegionHandler类中编辑regionInfo
AreaInfo.Resource area = new AreaInfo.Resource();
RegionInfoOuterClass.RegionInfo regionInfo = RegionInfoOuterClass.RegionInfo.newBuilder().setGateserverIp(region.Ip).setGateserverPort(region.Port).setResourceUrl(area.resourceUrl).setDataUrl(area.dataUrl).setResourceUrlBak(area.resourceUrlBak).setClientDataVersion(area.clientDataVersion).setClientSilenceDataVersion(area.clientSilenceDataVersion).setClientDataMd5(area.clientDataMd5).setClientSilenceDataMd5(area.clientSilenceDataMd5).setResVersionConfig(ResVersionConfigOuterClass.ResVersionConfig.newBuilder().setVersion(area.resVersionConfig.version).setMd5(area.resVersionConfig.md5).setReleaseTotalSize(area.resVersionConfig.releaseTotalSize).setVersionSuffix(area.resVersionConfig.versionSuffix).setBranch(area.resVersionConfig.branch).build()).setClientVersionSuffix(area.clientVersionSuffix).setClientSilenceVersionSuffix(area.clientSilenceVersionSuffix).setNextResourceUrl(area.nextResourceUrl).setNextResVersionConfig(ResVersionConfigOuterClass.ResVersionConfig.newBuilder().setVersion(area.nextResVersionConfig.version).setMd5(area.nextResVersionConfig.md5).setReleaseTotalSize(area.nextResVersionConfig.releaseTotalSize).setVersionSuffix(area.nextResVersionConfig.versionSuffix).setBranch(area.nextResVersionConfig.branch)).build();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request suggestion A suggestion
Projects
None yet
Development

No branches or pull requests

2 participants