本文整理了Java中org.apache.ignite.internal.util.typedef.F.eqNotOrdered()
方法的一些代码示例,展示了F.eqNotOrdered()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。F.eqNotOrdered()
方法的具体详情如下:
包路径:org.apache.ignite.internal.util.typedef.F
类名称:F
方法名:eqNotOrdered
暂无
代码示例来源:origin: apache/ignite
/**
* Checks if two given {@link SecurityPermissionSet} objects contain the same permissions.
* Each permission belongs to one of three groups : cache, task or system.
*
* @param locPerms The first set of permissions.
* @param rmtPerms The second set of permissions.
* @return {@code True} if given parameters contain the same permissions, {@code False} otherwise.
*/
private boolean permissionsEqual(SecurityPermissionSet locPerms, SecurityPermissionSet rmtPerms) {
boolean dfltAllowMatch = locPerms.defaultAllowAll() == rmtPerms.defaultAllowAll();
boolean bothHaveSamePerms = F.eqNotOrdered(rmtPerms.systemPermissions(), locPerms.systemPermissions()) &&
F.eqNotOrdered(rmtPerms.cachePermissions(), locPerms.cachePermissions()) &&
F.eqNotOrdered(rmtPerms.taskPermissions(), locPerms.taskPermissions());
return dfltAllowMatch && bothHaveSamePerms;
}
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
QueryEntity entity = (QueryEntity)o;
return F.eq(keyType, entity.keyType) &&
F.eq(valType, entity.valType) &&
F.eq(keyFieldName, entity.keyFieldName) &&
F.eq(valueFieldName, entity.valueFieldName) &&
F.eq(fields, entity.fields) &&
F.eq(keyFields, entity.keyFields) &&
F.eq(aliases, entity.aliases) &&
F.eqNotOrdered(idxs, entity.idxs) &&
F.eq(tableName, entity.tableName) &&
F.eq(_notNullFields, entity._notNullFields) &&
F.eq(defaultFieldValues, entity.defaultFieldValues) &&
F.eq(fieldsPrecision, entity.fieldsPrecision) &&
F.eq(fieldsScale, entity.fieldsScale);
}
代码示例来源:origin: apache/ignite
", nodes=" + F.nodeIds(nodes) + ']';
assert F.eqNotOrdered(nodes, owners);
assert F.eqNotOrdered(owners, nodes);
Collection<ClusterNode> m2 = mappings.get(j);
assert F.eqNotOrdered(m1, m2) : "Mappings are not equal [m1=" + F.nodeIds(m1) + ", m2=" +
F.nodeIds(m2) + ']';
assert F.eqNotOrdered(m2, m1) : "Mappings are not equal [m1=" + F.nodeIds(m1) + ", m2=" +
F.nodeIds(m2) + ']';
代码示例来源:origin: apache/ignite
if (!F.eqNotOrdered(allExpRows, allInfos))
fail("Returned incorrect rows [expected=" + allExpRows + ", actual=" + allInfos + "].");
代码示例来源:origin: apache/ignite
/**
* @throws Exception If failed.
*/
@Test
public void testHostNames() throws Exception {
Ignite ignite = grid();
Collection<String> locNodeHosts = ignite.cluster().localNode().hostNames();
Collection<String> clusterHosts = ignite.cluster().hostNames();
assertTrue(F.eqNotOrdered(locNodeHosts, clusterHosts));
boolean gotNpe = false;
try {
clusterHosts.add("valueShouldNotToBeAdded");
}
catch (UnsupportedOperationException ignored) {
gotNpe = true;
}
finally {
assertTrue(gotNpe);
}
}
代码示例来源:origin: apache/ignite
/**
* @throws Exception If failed.
*/
@Test
public void testMessaging() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
try (Ignite g1 = G.start(cfg)) {
IgniteMessaging messaging = message(grid().cluster().forNode(g1.cluster().localNode()));
messaging.send(null, "test");
GridMarshallerTestBean inBean = newTestBean(messaging);
byte[] buf = marshal(inBean);
GridMarshallerTestBean outBean = unmarshal(buf);
assert inBean.getObjectField() != null;
assert outBean.getObjectField() != null;
assert inBean.getObjectField().getClass().equals(IgniteMessagingImpl.class);
assert outBean.getObjectField().getClass().equals(IgniteMessagingImpl.class);
assert inBean != outBean;
assert inBean.equals(outBean);
ClusterGroup inPrj = messaging.clusterGroup();
ClusterGroup outPrj = ((IgniteMessaging)outBean.getObjectField()).clusterGroup();
assert inPrj.getClass().equals(outPrj.getClass());
assert F.eqNotOrdered(inPrj.nodes(), outPrj.nodes());
outBean.checkNullResources();
}
}
代码示例来源:origin: apache/ignite
/**
* @throws Exception If failed.
*/
@Test
public void testCompute() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
try (Ignite g1 = G.start(cfg)) {
IgniteCompute compute = compute(grid().cluster().forNode(g1.cluster().localNode()));
compute.run(new IgniteRunnable() {
@Override public void run() {
// No-op.
}
});
GridMarshallerTestBean inBean = newTestBean(compute);
byte[] buf = marshal(inBean);
GridMarshallerTestBean outBean = unmarshal(buf);
assert inBean.getObjectField() != null;
assert outBean.getObjectField() != null;
assert inBean.getObjectField().getClass().equals(IgniteComputeImpl.class);
assert outBean.getObjectField().getClass().equals(IgniteComputeImpl.class);
assert inBean != outBean;
assert inBean.equals(outBean);
ClusterGroup inPrj = compute.clusterGroup();
ClusterGroup outPrj = ((IgniteCompute)outBean.getObjectField()).clusterGroup();
assert inPrj.getClass().equals(outPrj.getClass());
assert F.eqNotOrdered(inPrj.nodes(), outPrj.nodes());
outBean.checkNullResources();
}
}
代码示例来源:origin: apache/ignite
/**
* @throws Exception If failed.
*/
@Test
public void testServices() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
try (Ignite g1 = G.start(cfg)) {
IgniteServices services = grid().services(grid().cluster().forNode(g1.cluster().localNode()));
services.deployNodeSingleton("test", new DummyService());
GridMarshallerTestBean inBean = newTestBean(services);
byte[] buf = marshal(inBean);
GridMarshallerTestBean outBean = unmarshal(buf);
assert inBean.getObjectField() != null;
assert outBean.getObjectField() != null;
assert inBean.getObjectField().getClass().equals(IgniteServicesImpl.class);
assert outBean.getObjectField().getClass().equals(IgniteServicesImpl.class);
assert inBean != outBean;
assert inBean.equals(outBean);
ClusterGroup inPrj = services.clusterGroup();
ClusterGroup outPrj = ((IgniteServices)outBean.getObjectField()).clusterGroup();
assert inPrj.getClass().equals(outPrj.getClass());
assert F.eqNotOrdered(inPrj.nodes(), outPrj.nodes());
outBean.checkNullResources();
}
}
代码示例来源:origin: apache/ignite
/**
* @throws Exception If failed.
*/
@Test
public void testEvents() throws Exception {
IgniteConfiguration cfg = optimize(getConfiguration("g1"));
try (Ignite g1 = G.start(cfg)) {
IgniteEvents evts = events(grid().cluster().forNode(g1.cluster().localNode()));
evts.localListen(new IgnitePredicate<Event>() {
@Override public boolean apply(Event gridEvt) {
return true;
}
}, EVTS_CACHE);
grid().cache(DEFAULT_CACHE_NAME).put(1, 1);
GridMarshallerTestBean inBean = newTestBean(evts);
byte[] buf = marshal(inBean);
GridMarshallerTestBean outBean = unmarshal(buf);
assert inBean.getObjectField() != null;
assert outBean.getObjectField() != null;
assert inBean.getObjectField().getClass().equals(IgniteEventsImpl.class);
assert outBean.getObjectField().getClass().equals(IgniteEventsImpl.class);
assert inBean != outBean;
assert inBean.equals(outBean);
ClusterGroup inPrj = evts.clusterGroup();
ClusterGroup outPrj = ((IgniteEvents)outBean.getObjectField()).clusterGroup();
assert inPrj.getClass().equals(outPrj.getClass());
assert F.eqNotOrdered(inPrj.nodes(), outPrj.nodes());
outBean.checkNullResources();
}
}
代码示例来源:origin: org.apache.ignite/ignite-core
/**
* Checks if two given {@link SecurityPermissionSet} objects contain the same permissions.
* Each permission belongs to one of three groups : cache, task or system.
*
* @param locPerms The first set of permissions.
* @param rmtPerms The second set of permissions.
* @return {@code True} if given parameters contain the same permissions, {@code False} otherwise.
*/
private boolean permissionsEqual(SecurityPermissionSet locPerms, SecurityPermissionSet rmtPerms) {
boolean dfltAllowMatch = locPerms.defaultAllowAll() == rmtPerms.defaultAllowAll();
boolean bothHaveSamePerms = F.eqNotOrdered(rmtPerms.systemPermissions(), locPerms.systemPermissions()) &&
F.eqNotOrdered(rmtPerms.cachePermissions(), locPerms.cachePermissions()) &&
F.eqNotOrdered(rmtPerms.taskPermissions(), locPerms.taskPermissions());
return dfltAllowMatch && bothHaveSamePerms;
}
代码示例来源:origin: org.apache.ignite/ignite-core
/** {@inheritDoc} */
@Override public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
QueryEntity entity = (QueryEntity)o;
return F.eq(keyType, entity.keyType) &&
F.eq(valType, entity.valType) &&
F.eq(keyFieldName, entity.keyFieldName) &&
F.eq(valueFieldName, entity.valueFieldName) &&
F.eq(fields, entity.fields) &&
F.eq(keyFields, entity.keyFields) &&
F.eq(aliases, entity.aliases) &&
F.eqNotOrdered(idxs, entity.idxs) &&
F.eq(tableName, entity.tableName) &&
F.eq(_notNullFields, entity._notNullFields) &&
F.eq(defaultFieldValues, entity.defaultFieldValues) &&
F.eq(fieldsPrecision, entity.fieldsPrecision) &&
F.eq(fieldsScale, entity.fieldsScale);
}
内容来源于网络,如有侵权,请联系作者删除!