alluxio.security.authorization.Mode.setGroupBits()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(96)

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

Mode.setGroupBits介绍

[英]Sets group bits.
[中]设置组位。

代码示例

代码示例来源:origin: Alluxio/alluxio

@Test
public void setGroupBits() {
 Mode mode = new Mode((short) 0000);
 mode.setGroupBits(Mode.Bits.READ_EXECUTE);
 assertEquals(Mode.Bits.READ_EXECUTE, mode.getGroupBits());
 mode.setGroupBits(Mode.Bits.WRITE);
 assertEquals(Mode.Bits.WRITE, mode.getGroupBits());
 mode.setGroupBits(Mode.Bits.ALL);
 assertEquals(Mode.Bits.ALL, mode.getGroupBits());
}

代码示例来源:origin: Alluxio/alluxio

case OWNING_GROUP:
 Mode modeGroup = new Mode(mMode);
 modeGroup.setGroupBits(Mode.Bits.NONE);
 if (mAccessAcl != null) {
  modeGroup.setGroupBits(new Mode(mAccessAcl.mMode).getGroupBits());

代码示例来源:origin: Alluxio/alluxio

/**
 * Applies the given umask {@link Mode} to this mode.
 *
 * @param mode the mode to update
 * @param umask the umask to apply
 * @return the updated object
 */
private static Mode applyUMask(Mode mode, Mode umask) {
 mode.setOwnerBits(mode.getOwnerBits().and(umask.getOwnerBits().not()));
 mode.setGroupBits(mode.getGroupBits().and(umask.getGroupBits().not()));
 mode.setOtherBits(mode.getOtherBits().and(umask.getOtherBits().not()));
 return mode;
}

代码示例来源:origin: Alluxio/alluxio

case OWNING_GROUP:
 Mode modeGroup = new Mode(mMode);
 modeGroup.setGroupBits(entry.getActions().toModeBits());
 mMode = modeGroup.toShort();
 return;

相关文章