All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.core.internal.registry.RegistryTimestamp Maven / Gradle / Ivy

Go to download

AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. This library is a superset of AspectJ weaver and hence also of AspectJ runtime.

There is a newer version: 1.9.22.1
Show newest version
/*******************************************************************************
 * Copyright (c) 2006 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.core.internal.registry;

/**
 * Aggregated registry timestamp. Corresponds to the current contents of the registry.
 * 

* This class may be instantiated. *

* This class is not indended to be subclassed. *

* @since org.eclipse.equinox.registry 3.3 */ public final class RegistryTimestamp { /** * Current aggregated timestamp */ private long aggregateTimestamp; private boolean modified; /** * Public constructor. */ public RegistryTimestamp() { reset(); } /** * Returns value of the aggregated timestamp. * @return value of the aggregated timestamp */ public long getContentsTimestamp() { return aggregateTimestamp; } /** * Set value of the aggregated timestamp. * @param timestamp the aggregated timestamp of the current registry contents */ public void set(long timestamp) { aggregateTimestamp = timestamp; modified = false; } /** * Sets aggregated timestamp to the value corresponding to an empty registry. */ public void reset() { aggregateTimestamp = 0; modified = false; } /** * Determines if the aggregate timestamp was modified using add() or remove() * methods. * @return true: the timestamp was modified after the last set/reset */ public boolean isModifed() { return modified; } /** * Add individual contribution timestamp to the aggregated timestamp. * @param timestamp the time stamp of the contribution being added to the registry */ public void add(long timestamp) { aggregateTimestamp ^= timestamp; modified = true; } /** * Remove individual contribution timestamp from the aggregated timestamp. * @param timestamp the time stamp of the contribution being removed from the registry */ public void remove(long timestamp) { aggregateTimestamp ^= timestamp; modified = true; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy