/*
- * Sone - WebOfTrustUpdater.java - Copyright © 2013 David Roden
+ * Sone - WebOfTrustUpdaterImpl.java - Copyright © 2013–2019 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
package net.pterodactylus.sone.core;
import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.logging.Logger.getLogger;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import net.pterodactylus.sone.freenet.wot.Trust;
import net.pterodactylus.sone.freenet.wot.WebOfTrustConnector;
import net.pterodactylus.sone.freenet.wot.WebOfTrustException;
-import net.pterodactylus.util.logging.Logging;
import net.pterodactylus.util.service.AbstractService;
import com.google.common.annotations.VisibleForTesting;
/**
* Updates WebOfTrust identity data in a background thread because communicating
* with the WebOfTrust plugin can potentially last quite long.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@Singleton
public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrustUpdater {
/** The logger. */
- private static final Logger logger = Logging.getLogger(WebOfTrustUpdaterImpl.class);
+ private static final Logger logger = getLogger(WebOfTrustUpdaterImpl.class.getName());
/** Stop job. */
@SuppressWarnings("synthetic-access")
private final WebOfTrustConnector webOfTrustConnector;
/** The queue for jobs. */
- private final BlockingQueue<WebOfTrustUpdateJob> updateJobs = new LinkedBlockingQueue<WebOfTrustUpdateJob>();
+ private final BlockingQueue<WebOfTrustUpdateJob> updateJobs = new LinkedBlockingQueue<>();
/**
* Creates a new trust updater.
/**
* Base class for WebOfTrust update jobs.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@VisibleForTesting
class WebOfTrustUpdateJob implements Runnable {
/**
* Update job that sets the trust relation between two identities.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@VisibleForTesting
class SetTrustJob extends WebOfTrustUpdateJob {
/**
* Base class for context updates of an {@link OwnIdentity}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@VisibleForTesting
class WebOfTrustContextUpdateJob extends WebOfTrustUpdateJob {
/**
* Job that adds a context to an {@link OwnIdentity}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@VisibleForTesting
class AddContextJob extends WebOfTrustContextUpdateJob {
/**
* Job that removes a context from an {@link OwnIdentity}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@VisibleForTesting
class RemoveContextJob extends WebOfTrustContextUpdateJob {
/**
* WebOfTrust update job that sets a property on an {@link OwnIdentity}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
@VisibleForTesting
class SetPropertyJob extends WebOfTrustUpdateJob {