本文整理了Java中alluxio.security.authorization.Mode.setOwnerBits()
方法的一些代码示例,展示了Mode.setOwnerBits()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mode.setOwnerBits()
方法的具体详情如下:
包路径:alluxio.security.authorization.Mode
类名称:Mode
方法名:setOwnerBits
[英]Sets owner bits.
[中]设置所有者位。
代码示例来源:origin: Alluxio/alluxio
@Test
public void setOwnerBits() {
Mode mode = new Mode((short) 0000);
mode.setOwnerBits(Mode.Bits.READ_EXECUTE);
assertEquals(Mode.Bits.READ_EXECUTE, mode.getOwnerBits());
mode.setOwnerBits(Mode.Bits.WRITE);
assertEquals(Mode.Bits.WRITE, mode.getOwnerBits());
mode.setOwnerBits(Mode.Bits.ALL);
assertEquals(Mode.Bits.ALL, mode.getOwnerBits());
}
代码示例来源:origin: Alluxio/alluxio
case OWNING_USER:
Mode modeOwner = new Mode(mMode);
modeOwner.setOwnerBits(Mode.Bits.NONE);
if (mAccessAcl != null) {
modeOwner.setOwnerBits(new Mode(mAccessAcl.mMode).getOwnerBits());
代码示例来源: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_USER:
Mode modeOwner = new Mode(mMode);
modeOwner.setOwnerBits(entry.getActions().toModeBits());
mMode = modeOwner.toShort();
return;
代码示例来源:origin: Alluxio/alluxio
updateMode.setOwnerBits(updateMode.getOwnerBits().and(defaultMode.getOwnerBits()));
updateMode.setOtherBits(updateMode.getOtherBits().and(defaultMode.getOtherBits()));
acl.mMode = updateMode.toShort();
内容来源于网络,如有侵权,请联系作者删除!