@Override public boolean has(String key) { return map.containsKey(key); }
@Override public boolean checkExists(TriggerKey triggerKey) throws JobPersistenceException { return triggersByKey.containsKey(triggerKey); }
@Override public boolean containsKey(Object key) { return map.containsKey(key); }
/** * Check if session with sessionId exists on the cluster * * @param sessionId the session id * @return true if session exists on the cluster */ public boolean containsSession(String sessionId) { return clusterMap.containsKey(sessionId); }
/** * Checks if the key in question is in the repository. * * @param key Object - key in question */ public boolean containsKey(Object key) { if (cache != null) { return cache.containsKey(key); } else { return false; } }
/** * Check if session with sessionId exists on the cluster * * @param sessionId the session id * @return true if session exists on the cluster */ public boolean containsSession(String sessionId) { return clusterMap.containsKey(sessionId); }
@Override public boolean checkExists(JobKey jobKey) throws JobPersistenceException { return jobsByKey.containsKey(jobKey); }
@Override public boolean containsKey(@Nonnull K k) { return map.containsKey(k); }
public void run() { IMap map = hazelcast.getMap("myMap"); map.containsKey(random.nextInt(SIZE)); } }, 2);
/** * Check for a specific key in the cache and return true if it exists or false otherwise */ private void containsKey(Object oid, Exchange exchange) { exchange.getOut().setBody(this.cache.containsKey(oid)); }
@Override public boolean contains(String appid, String id) { if (StringUtils.isBlank(id) || StringUtils.isBlank(appid)) { return false; } return client().getMap(appid).containsKey(id); }
/** * Returns the status of whether the worker is enabled or not * * @param id the id of the worker to test * @return true if the worker is enabled, false otherwise */ @Override public boolean workerEnabled(String id) { return workerEnabled.containsKey(id) && workerEnabled.get(id); }
/** * Determines whether the record of the specified key exists. * * @param key The key to check. * @return {@literal true}, if record exists; otherwise, {@literal false}. */ @Override public boolean exists(final Comparable<?> key) { return getDistributedObject().containsKey(key); }
@Override public boolean contains(String key) { repo.lock(key); try { return this.repo.containsKey(key); } finally { repo.unlock(key); } }
public Schema createSchema(String schemaName, String description, Properties props) { Schema schema = null; if (!entityCache.containsKey(schemaName)) { // get current user from context... String user = srvUser.getCurrentUser(); Object result = entityCache.executeOnKey(schemaName, new SchemaCreator(user, description, props)); logger.debug("addSchema; execution result: {}", result); schema = (Schema) result; } return schema; }
private boolean addNode(String name, Properties options) throws Exception { if (!entityCache.containsKey(name)) { Object result = entityCache.executeOnKey(name, new NodeCreator(getCurrentUser(), name, options)); logger.debug("addNode; execution result: {}", result); return true; } return false; }
@Override public OperableTrigger retrieveTrigger(final TriggerKey triggerKey) throws JobPersistenceException { return triggerKey != null && triggersByKey.containsKey(triggerKey) ? (OperableTrigger) triggersByKey .get(triggerKey).getTrigger().clone() : null; }
public void remove(String identifier) { if (!StringUtils.isEmpty(identifier) && getCacheMap().containsKey(identifier)) { getCacheMap().remove(identifier); } }
public void remove(String identifier) { if (!StringUtils.isEmpty(identifier) && getCacheMap().containsKey(identifier)) { getCacheMap().remove(identifier); } }
@ManagedOperation(description="Create new Role") @ManagedOperationParameters({ @ManagedOperationParameter(name = "name", description = "User name"), @ManagedOperationParameter(name = "description", description = "Role description")}) public boolean addRole(String name, String description) { if (!entityCache.containsKey(name)) { Object result = entityCache.executeOnKey(name, new RoleCreator(getCurrentUser(), description)); logger.debug("addRole; execution result: {}", result); return true; } return false; }