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

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

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

Mode.setOtherBits介绍

[英]Sets other bits.
[中]设置其他位。

代码示例

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

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

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

case OTHER:
 Mode modeOther = new Mode(mMode);
 modeOther.setOtherBits(Mode.Bits.NONE);
 if (mAccessAcl != null) {
  modeOther.setOtherBits(new Mode(mAccessAcl.mMode).getOtherBits());

代码示例来源: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 OTHER:
 Mode modeOther = new Mode(mMode);
 modeOther.setOtherBits(entry.getActions().toModeBits());
 mMode = modeOther.toShort();
 return;

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

updateMode.setOtherBits(updateMode.getOtherBits().and(defaultMode.getOtherBits()));
acl.mMode = updateMode.toShort();

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

Long ufsLastModified = context.getUfsStatus().getLastModifiedTime();
if (resolution.getShared()) {
 mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));

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

Mode mode = new Mode(ufsMode);
if (resolution.getShared()) {
 mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));

代码示例来源:origin: org.alluxio/alluxio-core-server-master

Mode mode = new Mode(ufsMode);
if (resolution.getShared()) {
 mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));

代码示例来源:origin: org.alluxio/alluxio-core-server-master

Long ufsLastModified = ufsStatus.getLastModifiedTime();
if (resolution.getShared()) {
 mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));

相关文章