- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.twitter.distributedlog.acl.ZKAccessControlManager
类的一些代码示例,展示了ZKAccessControlManager
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKAccessControlManager
类的具体详情如下:
包路径:com.twitter.distributedlog.acl.ZKAccessControlManager
类名称:ZKAccessControlManager
[英]ZooKeeper Based com.twitter.distributedlog.acl.AccessControlManager
[中]基于ZooKeeper的com。啁啾分布式日志。国际计算语言学协会。访问控制管理器
代码示例来源:origin: twitter/distributedlog
private Future<Void> fetchAccessControlEntries() {
final Promise<Void> promise = new Promise<Void>();
fetchAccessControlEntries(promise);
return promise;
}
代码示例来源:origin: twitter/distributedlog
private Future<ZKAccessControl> fetchDefaultAccessControlEntry() {
final Promise<ZKAccessControl> promise = new Promise<ZKAccessControl>();
fetchDefaultAccessControlEntry(promise);
return promise;
}
代码示例来源:origin: twitter/distributedlog
@Override
public boolean allowDelete(String stream) {
return !getAccessControlEntry(stream).isDenyDelete();
}
代码示例来源:origin: twitter/distributedlog
String stream2 = "test-acm-2";
logger.info("Creating ACL Manager for {}", zkRootPath);
ZKAccessControlManager zkcm = new ZKAccessControlManager(conf, zkc, zkRootPath, executorService);
logger.info("Created ACL Manager for {}", zkRootPath);
try {
setACL(accessControl1);
logger.info("Create ACL for stream {} : {}", stream1, accessControl1);
while (zkcm.allowDelete(stream1)) {
Thread.sleep(100);
setACL(accessControl2);
logger.info("Create ACL for stream {} : {}", stream2, accessControl2);
while (zkcm.allowWrite(stream1)) {
Thread.sleep(100);
while (zkcm.allowTruncate(stream2)) {
Thread.sleep(100);
while (!zkcm.allowTruncate(stream2)) {
Thread.sleep(100);
while (zkcm.allowRelease(stream1)) {
Thread.sleep(100);
while (zkcm.allowAcquire(stream2)) {
Thread.sleep(100);
verifyStreamPermissions(zkcm, stream2, true, true, true, true, false);
代码示例来源:origin: twitter/distributedlog
static void verifyStreamPermissions(ZKAccessControlManager zkcm,
String stream,
boolean allowWrite,
boolean allowTruncate,
boolean allowRelease,
boolean allowDelete,
boolean allowAcquire) throws Exception {
assertEquals(allowWrite, zkcm.allowWrite(stream));
assertEquals(allowTruncate, zkcm.allowTruncate(stream));
assertEquals(allowRelease, zkcm.allowRelease(stream));
assertEquals(allowDelete, zkcm.allowDelete(stream));
assertEquals(allowAcquire, zkcm.allowAcquire(stream));
}
代码示例来源:origin: twitter/distributedlog
@Override
public synchronized AccessControlManager createAccessControlManager() throws IOException {
if (null == accessControlManager) {
String aclRootPath = bkdlConfig.getACLRootPath();
// Build the access control manager
if (aclRootPath == null) {
accessControlManager = DefaultAccessControlManager.INSTANCE;
LOG.info("Created default access control manager for {}", namespace);
} else {
if (!isReservedStreamName(aclRootPath)) {
throw new IOException("Invalid Access Control List Root Path : " + aclRootPath);
}
String zkRootPath = namespace.getPath() + "/" + aclRootPath;
LOG.info("Creating zk based access control manager @ {} for {}",
zkRootPath, namespace);
accessControlManager = new ZKAccessControlManager(conf, sharedReaderZKCForDL,
zkRootPath, scheduler);
LOG.info("Created zk based access control manager @ {} for {}",
zkRootPath, namespace);
}
}
return accessControlManager;
}
代码示例来源:origin: twitter/distributedlog
this.streamEntries = new ConcurrentHashMap<String, ZKAccessControl>();
try {
Await.result(fetchDefaultAccessControlEntry());
} catch (Throwable t) {
if (t instanceof InterruptedException) {
Await.result(fetchAccessControlEntries());
} catch (Throwable t) {
if (t instanceof InterruptedException) {
代码示例来源:origin: twitter/distributedlog
@Override
public boolean allowRelease(String stream) {
return !getAccessControlEntry(stream).isDenyRelease();
}
代码示例来源:origin: twitter/distributedlog
@Override
public boolean allowTruncate(String stream) {
return !getAccessControlEntry(stream).isDenyTruncate();
}
代码示例来源:origin: twitter/distributedlog
@Override
public boolean allowWrite(String stream) {
return !getAccessControlEntry(stream).isDenyWrite();
}
代码示例来源:origin: twitter/distributedlog
@Override
public boolean allowAcquire(String stream) {
return !getAccessControlEntry(stream).isDenyAcquire();
}
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder类的一些代码示例,展示了ZooKeeperClientBuilder类的具体用法。
本文整理了Java中com.twitter.distributedlog.metadata.ZkMetadataResolver类的一些代码示例,展示了ZkMetadataResolver类的具体用法
本文整理了Java中com.twitter.distributedlog.zk.ZKVersionedSetOp类的一些代码示例,展示了ZKVersionedSetOp类的具体用法。这些代码示例主要来
本文整理了Java中com.twitter.distributedlog.lock.ZKSessionLock类的一些代码示例,展示了ZKSessionLock类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.twitter.distributedlog.zk.ZKWatcherManager类的一些代码示例,展示了ZKWatcherManager类的具体用法。这些代码示例主要来
本文整理了Java中com.twitter.distributedlog.acl.ZKAccessControlManager类的一些代码示例,展示了ZKAccessControlManager类的具
本文整理了Java中com.twitter.distributedlog.impl.ZKNamespaceWatcher类的一些代码示例,展示了ZKNamespaceWatcher类的具体用法。这些代
本文整理了Java中com.twitter.distributedlog.exceptions.ZKException类的一些代码示例,展示了ZKException类的具体用法。这些代码示例主要来源于
本文整理了Java中com.twitter.distributedlog.impl.ZKLogMetadataStore类的一些代码示例,展示了ZKLogMetadataStore类的具体用法。这些代
本文整理了Java中com.twitter.distributedlog.acl.ZKAccessControl类的一些代码示例,展示了ZKAccessControl类的具体用法。这些代码示例主要来源
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.retryPolicy()方法的一些代码示例,展示了ZooKeeperClien
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.retryThreadCount()方法的一些代码示例,展示了ZooKeeper
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.statsLogger()方法的一些代码示例,展示了ZooKeeperClien
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.zkServers()方法的一些代码示例,展示了ZooKeeperClientB
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.uri()方法的一些代码示例,展示了ZooKeeperClientBuilder
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.build()方法的一些代码示例,展示了ZooKeeperClientBuild
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.name()方法的一些代码示例,展示了ZooKeeperClientBuilde
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.zkAclId()方法的一些代码示例,展示了ZooKeeperClientBui
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.requestRateLimit()方法的一些代码示例,展示了ZooKeeper
本文整理了Java中com.twitter.distributedlog.ZooKeeperClientBuilder.newBuilder()方法的一些代码示例,展示了ZooKeeperClient
我是一名优秀的程序员,十分优秀!