org.vertexium.mutation.AlterPropertyVisibility Maven / Gradle / Ivy
package org.vertexium.mutation;
import org.vertexium.Visibility;
import org.vertexium.util.IncreasingTime;
public class AlterPropertyVisibility {
private final String key;
private final String name;
private final long timestamp;
private Visibility existingVisibility;
private final Visibility visibility;
private final Object data;
public AlterPropertyVisibility(String key, String name, Visibility existingVisibility, Visibility visibility, Object data) {
this.key = key;
this.name = name;
this.existingVisibility = existingVisibility;
this.visibility = visibility;
this.data = data;
this.timestamp = IncreasingTime.currentTimeMillis();
// org.vertexium.inmemory.InMemoryGraph.alterElementPropertyVisibilities() requires an additional timestamp
// to store the soft delete then the alter, this call will increment the counter
IncreasingTime.advanceTime(1);
}
public String getKey() {
return key;
}
public String getName() {
return name;
}
public Visibility getExistingVisibility() {
return existingVisibility;
}
public long getTimestamp() {
return timestamp;
}
public void setExistingVisibility(Visibility existingVisibility) {
this.existingVisibility = existingVisibility;
}
public Visibility getVisibility() {
return visibility;
}
public Object getData() {
return data;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy