blob: 383334616d56134f7acdb8ade4563ac99448a0db [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.osgi.internal.resolver;
import org.eclipse.osgi.service.resolver.BundleDescription;
public class SystemState extends StateImpl {
public boolean addBundle(BundleDescription description) {
if (!super.addBundle(description))
return false;
updateTimeStamp();
return true;
}
public boolean removeBundle(BundleDescription toRemove) {
if (!super.removeBundle(toRemove))
return false;
updateTimeStamp();
return true;
}
private void updateTimeStamp() {
if (timeStamp == Long.MAX_VALUE)
timeStamp = 0;
timeStamp++;
}
}