本文整理了Java中alluxio.security.authorization.Mode.fromProto()
方法的一些代码示例,展示了Mode.fromProto()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mode.fromProto()
方法的具体详情如下:
包路径:alluxio.security.authorization.Mode
类名称:Mode
方法名:fromProto
[英]Creates Mode from proto PMode.
[中]从proto-PMode创建模式。
代码示例来源:origin: Alluxio/alluxio
/**
* Used to get short value of a proto {@link PMode}.
*
* @param pMode proto mode
* @return short value
*/
public static short protoToShort(PMode pMode) {
return Mode.fromProto(pMode).toShort();
}
代码示例来源:origin: Alluxio/alluxio
private void loadExtractedFields() {
com.google.protobuf.GeneratedMessageV3.Builder<?> optionsBuilder = getOptions();
// Populate extracted fields from given options
if (optionsBuilder instanceof CreateFilePOptions.Builder) {
CreateFilePOptions.Builder fileOptions = (CreateFilePOptions.Builder) optionsBuilder;
mMode = Mode.fromProto(fileOptions.getMode());
mRecursive = fileOptions.getRecursive();
mTtl = fileOptions.getCommonOptions().getTtl();
mTtlAction = fileOptions.getCommonOptions().getTtlAction();
}
// Populate extracted fields from given options
if (optionsBuilder instanceof CreateDirectoryPOptions.Builder) {
CreateDirectoryPOptions.Builder dirOptions = (CreateDirectoryPOptions.Builder) optionsBuilder;
mMode = Mode.fromProto(dirOptions.getMode());
mRecursive = dirOptions.getRecursive();
mTtl = dirOptions.getCommonOptions().getTtl();
mTtlAction = dirOptions.getCommonOptions().getTtlAction();
}
}
代码示例来源:origin: Alluxio/alluxio
mMode = Mode.fromProto(options.getMode());
内容来源于网络,如有侵权,请联系作者删除!