public final class PropertyCollectionRegistry extends Object implements Serializable
PropertyCollection.getName()".
public void preValidation() {
PropertyCollectionRegistry.removeRegister(this);
}
public void preValidation() {
PropertyFrameworkGlobals.setAutoRegisterPropertyCollections(false);
}
public class MyPropertiesDemo extends PropertyExposedFinalFieldCollection implements MarkerNoPropertyCollectionRegistry {
private MyPropertiesDemo(ManifestPropertyIO io) {
super(io);
}
public static MyPropertiesDemo getInstance(ManifestPropertyIO io) {
MyPropertiesDemo collection = new MyPropertiesDemo(io);
PropertyFieldCollection.initialize(collection);
return collection;
}
public static MyPropertiesDemo getInstance() {
return getInstance(new ManifestPropertyIO());
}
}
public class MyPropertiesDemo extends PropertyExposedFinalFieldCollection {
private MyPropertiesDemo(ManifestPropertyIO io) {
super(io);
}
public static MyPropertiesDemo getInstance(ManifestPropertyIO io) {
MyPropertiesDemo collection = new MyPropertiesDemo(io);
PropertyFieldCollection.initialize(collection);
return collection;
}
public static MyPropertiesDemo getInstance() {
return getInstance(new ManifestPropertyIO());
}
public long getRegistryTimeout() {
return 0; //PropertyCollection.PROPERTY_REGISTRY_DO_NOT_REGISTER
}
}
hestremoveRegister(PropertyCollection),
PropertyFrameworkGlobals.setAutoRegisterPropertyCollections(boolean),
PropertyCollection.preValidation(),
PropertyCollection.postValidation(),
PropertyCollection.getRegistryTimeout(),
MarkerNoPropertyCollectionRegistry,
PropertyCollection.getName(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
static void |
clearRegistry()
Clears all registered PropertyCollections from the registry.
|
static PropertyCollection |
getCollection(String key)
Gets a PropertyCollection by its key.
|
static Date |
getLastUpdated()
The last datetime when the PropertyCollectionRegistry was updated.
|
static Iterator<String> |
getRegisteredCollections()
Gets an iterator over all registered PropertyCollection keys.
|
static void |
refreshRegistry()
Refresh the registry, and removes all the PropertyCollections who has timedout.
|
static void |
register(PropertyCollection collection)
Register a PropertyCollection, using its "getName" as key.
|
static void |
removeRegister(PropertyCollection collection)
Removes a PropertyCollection from the registry.
|
static int |
size()
Gets the number of registered PropertyCollections.
|
static int |
size(String key)
Gets the number of Property's in a PropertyCollection.
|
public static final Date getLastUpdated()
Date(0).
public static final void register(PropertyCollection collection) throws NullPointerException
collection - the PropertyCollection.NullPointerException - if collection is null.public static final void removeRegister(PropertyCollection collection) throws NullPointerException
collection - a PropertyCollectionNullPointerException - if collection is null.public static final Iterator<String> getRegisteredCollections()
public static final PropertyCollection getCollection(String key)
key - the key that uniquely identifies the PropertyCollection.null.public static final int size()
public static final int size(String key)
key - the key that uniquely identifies the PropertyCollection.0 is returned.public static final void clearRegistry()
public static final void refreshRegistry()