T
- The type of the object which is storedpublic abstract class MetaDataKey<T> extends Object implements IClusterable
Component
, Session
or
Application
at runtime. The key contains type information that can be used to check the
type of any metadata value for the key when the value is set. MetaDataKey is abstract in order to
force the creation of a subtype. That subtype is used to test for identity when looking for the
metadata because actual object identity would suffer from problems under serialization. So, the
correct way to declare a MetaDataKey is like this:
public static final MetaDataKey<Role> ROLE = new MetaDataKey<Role>() { };
Session.getMetaData(MetaDataKey)
,
Component.getMetaData(MetaDataKey)
,
Application.getMetaData(MetaDataKey)
,
Serialized FormConstructor and Description |
---|
MetaDataKey()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
T |
get(MetaDataEntry<?>[] metaData) |
int |
hashCode() |
MetaDataEntry<?>[] |
set(MetaDataEntry<?>[] metaData,
Object object) |
String |
toString() |
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public T get(MetaDataEntry<?>[] metaData)
metaData
- Array of metadata to searchpublic MetaDataEntry<?>[] set(MetaDataEntry<?>[] metaData, Object object)
metaData
- The array of metadataobject
- The object to set, null to removepublic String toString()
toString
in class Object
Object.toString()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.