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

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

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

Mode.createNoAccess介绍

[英]Creates the "no access" mode.
[中]创建“禁止访问”模式。

代码示例

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

/**
 * Creates a new instance of {@link alluxio.util.webui.UIFileInfo}.
 *
 * @param fileInfo underlying {@link alluxio.util.webui.UIFileInfo.LocalFileInfo}
 */
public UIFileInfo(UIFileInfo.LocalFileInfo fileInfo) {
 mId = -1;
 mName = fileInfo.mName;
 mAbsolutePath = fileInfo.mAbsolutePath;
 mBlockSizeBytes = 0;
 mSize = fileInfo.mSize;
 mCreationTimeMs = fileInfo.mCreationTimeMs;
 mLastModificationTimeMs = fileInfo.mLastModificationTimeMs;
 mInAlluxio = false;
 mInAlluxioPercentage = 0;
 mIsDirectory = fileInfo.mIsDirectory;
 mPinned = false;
 mOwner = "";
 mGroup = "";
 mMode = FormatUtils.formatMode(Mode.createNoAccess().toShort(), true, false);
 mPersistenceState = PersistenceState.NOT_PERSISTED.name();
 mFileLocations = new ArrayList<>();
}

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

/**
 * Tests the {@link Mode#createNoAccess()} method.
 */
@Test
public void createNoAccess() {
 Mode mode = Mode.createNoAccess();
 assertEquals(Mode.Bits.NONE, mode.getOwnerBits());
 assertEquals(Mode.Bits.NONE, mode.getGroupBits());
 assertEquals(Mode.Bits.NONE, mode.getOtherBits());
 assertEquals(0000, mode.toShort());
}

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

/**
 * Tests the {@link Mode#equals(Object)} method.
 */
@Test
public void equals() {
 Mode allAccess = new Mode((short) 0777);
 assertTrue(allAccess.equals(Mode.defaults()));
 Mode noAccess = new Mode((short) 0000);
 assertTrue(noAccess.equals(Mode.createNoAccess()));
 assertFalse(allAccess.equals(noAccess));
}

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

/**
 * Creates a new instance of {@link UIFileInfo}.
 *
 * @param fileInfo underlying {@link UIFileInfo.LocalFileInfo}
 */
public UIFileInfo(LocalFileInfo fileInfo) {
 mId = -1;
 mName = fileInfo.mName;
 mAbsolutePath = fileInfo.mAbsolutePath;
 mBlockSizeBytes = 0;
 mSize = fileInfo.mSize;
 mCreationTimeMs = fileInfo.mCreationTimeMs;
 mLastModificationTimeMs = fileInfo.mLastModificationTimeMs;
 mInAlluxio = false;
 mInAlluxioPercentage = 0;
 mIsDirectory = fileInfo.mIsDirectory;
 mPinned = false;
 mOwner = "";
 mGroup = "";
 mMode = FormatUtils.formatMode(Mode.createNoAccess().toShort(), true);
 mPersistenceState = PersistenceState.NOT_PERSISTED.name();
 mFileLocations = new ArrayList<>();
}

相关文章