/** * @param schema If {@code true} then add schema name to full name. * @return Fully qualified field name with type name and schema name. */ public String getFullName(boolean schema) { if (!F.isEmpty(typeName)) { if (schema && !F.isEmpty(schemaName)) return schemaName + "." + typeName + "." + fieldName; return typeName + "." + fieldName; } return fieldName; }
/** * @return Current value and stamp. */ public IgniteBiTuple<T, S> get() { return F.t(val, stamp); }
/** * @return Min and max value for delay between node killings. */ protected T2<Long, Long> killDelay() { return new T2<>(5000L, 10000L); }
@Override public boolean apply(Event evt) { X.println("Task event: " + evt); return true; } }, EVTS_TASK_EXECUTION);
/** * Returns only directly available nodes from given collection. * * @param nodes Nodes. * @return Directly available subset. */ protected static Collection<GridClientNode> selectDirectNodes(Collection<? extends GridClientNode> nodes) { return F.viewReadOnly(nodes, F.<GridClientNode>identity(), CONNECTABLE); } }
/** * @return Writes. */ public Collection<IgniteTxEntry> writes() { return F.view(entries, CU.WRITE_FILTER); }
/** * @param col Collection. * @return Collection with masked {@code null} values. */ private Collection<Object> maskNulls(Collection<Object> col) { assert col != null; return F.viewReadOnly(col, new C1<Object, Object>() { @Override public Object apply(Object e) { return e != null ? e : NULL; } }); }
/** * @param nodeId Node ID. * @return Grid. */ private Ignite grid(UUID nodeId) { return G.ignite(nodeId); }
/** * Returns true if the exception is triggered by query cancel. * * @param e Exception. * @return {@code true} if exception is caused by cancel. */ private boolean wasCancelled(CacheException e) { return X.hasSuppressed(e, QueryCancelledException.class); }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (obj != null && obj instanceof ClientListenerProtocolVersion) { ClientListenerProtocolVersion other = (ClientListenerProtocolVersion)obj; return F.eq(major, other.major) && F.eq(minor, other.minor) && F.eq(maintenance, other.maintenance); } return false; }
/** * @return {@code True} if have cache stop requests. */ public boolean hasStop() { return !F.isEmpty(cachesToStop); }
/** * @return {@code True} if there are no cache change actions. */ public boolean empty() { return F.isEmpty(cachesToStart) && F.isEmpty(cachesToStop) && F.isEmpty(cacheGrpsToStart) && F.isEmpty(cacheGrpsToStop) && F.isEmpty(cachesToResetLostParts) && stateChangeReq == null && locJoinCtx == null; }
/** * @param id ID. * @param name Name. */ private Organization(int id, String name) { assert id > 0; assert !F.isEmpty(name); this.id = id; this.name = name; }
/** */ @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Person)) return false; Person other = (Person)o; return F.eq(other.name, name) && other.age == age; } }