private static void warnOnWrongVisibility(Method method) { if (!Modifier.isProtected(method.getModifiers())) { Mixing.LOG.WARN("Handler %s.%s is not declared protected!", method.getDeclaringClass().getName(), method.getName()); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new StringListMapProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new StringBooleanMapProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new BaseEntityRefListProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new StringLocalDateTimeMapProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new StringMapProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new MultiPointLocationProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new ElasticRefProperty(descriptor, accessPath, field)); } }
private static void handleConfigError(String file, Exception e) { Exceptions.ignore(e); Sirius.LOG.WARN("Cannot load %s: %s", file, e.getMessage()); }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new SQLEntityRefProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new MongoRefProperty(descriptor, accessPath, field)); } }
@Override public void create(EntityDescriptor descriptor, AccessPath accessPath, Field field, Consumer<Property> propertyConsumer) { if (!Modifier.isFinal(field.getModifiers())) { Mixing.LOG.WARN("Field %s in %s is not final! This will probably result in errors.", field.getName(), field.getDeclaringClass().getName()); } propertyConsumer.accept(new StringListProperty(descriptor, accessPath, field)); } }
/** * Deletes the object */ public void delete() { if (!file.delete()) { Storage.LOG.WARN("Failed to delete data file for object %s (%s).", getName(), file.getAbsolutePath()); } if (!getPropertiesFile().delete()) { Storage.LOG.WARN("Failed to delete properties file for object %s (%s).", getName(), getPropertiesFile().getAbsolutePath()); } }
@Override public void close() { ops.remove(this); if (isOvertime()) { Tasks.LOG.WARN(toString()); } }
@Override public void handle(MutableGlobalContext ctx, Object object, Field field) throws Exception { ConfigValue val = field.getAnnotation(ConfigValue.class); String key = val.value(); if (!Sirius.getSettings().injectValueFromConfig(object, field, key) && val.required()) { Injector.LOG.WARN("Missing config value: %s in (%s.%s)!", key, field.getDeclaringClass().getName(), field.getName()); } } }
private static void stopLifecycleParticipants() { LOG.INFO("Stopping lifecycles..."); LOG.INFO(SEPARATOR_LINE); for (int i = lifecycleStopParticipants.size() - 1; i >= 0; i--) { Stoppable stoppable = lifecycleStopParticipants.get(i); Future future = tasks.defaultExecutor().fork(() -> stopLifecycle(stoppable)); if (!future.await(Duration.ofSeconds(10))) { LOG.WARN("Lifecycle '%s' did not stop within 10 seconds....", stoppable.getClass().getName()); } } LOG.INFO(SEPARATOR_LINE); }
/** * Marks the bucket as private accessible. */ public void makePrivate() { if (getPublicMarkerFile().exists()) { if (getPublicMarkerFile().delete()) { publicAccessCache.put(getName(), false); } else { Storage.LOG.WARN("Failed to delete public marker for bucket %s - it remains public!", getName()); } } }
protected int ensurePositiveLength(TableColumn column, int defaultValue) { if (column.getLength() == 0) { OMA.LOG.WARN("The property '%s' doesn't specify a length for its column! Defaulting to 255!", column.getSource()); return defaultValue; } return column.getLength(); }
@Override public boolean exists() { if (skip > 0 || limit > 0) { Elastic.LOG.WARN("EXISTS queries support neither skip nor limit: %s\n%s", this, ExecutionPoint.snapshot()); } checkRouting(); List<String> indices = determineIndices(); if (indices.isEmpty()) { return false; } JSONObject existsResponse = client.exists(indices, elastic.determineTypeName(descriptor), routing, buildSimplePayload()); return existsResponse.getJSONObject(KEY_HITS).getInteger(KEY_TOTAL) >= 1; }