public abstract class CommonPropertyImpl extends TypelessPropertyImpl implements CallbackDispatcher
java.lang.Object.| Modifier and Type | Class and Description |
|---|---|
protected class |
CommonPropertyImpl.GetAsyncAction
BACI action to invoke
getSync asynchroniously. |
protected class |
CommonPropertyImpl.SetAsyncAction
BACI action to invoke
setSync asynchronously. |
| Modifier and Type | Field and Description |
|---|---|
protected DataAccess |
dataAccess
Read-only data access.
|
protected long |
defaultTimerTrigger
Default timer trigger (in 100ns units).
|
protected java.lang.Object |
defaultValue
Default value.
|
protected int |
historyPosition
Pointer in history arrays, points to first empty element.
|
protected int |
historySize
History size, if 0 history is disabled.
|
protected long[] |
historyTime
Array of history times (OMG standard time).
|
protected boolean |
historyTurnaround
true, if values in history arrays exceed end of arrays (circular arrays). |
protected java.lang.Object |
historyValue
Array of history values.
|
protected java.util.logging.Logger |
m_logger
Logger variable
|
protected long |
minTimerTrigger
Min timer trigger (in 100ns units).
|
protected Completion |
mnemonicCompletion
Completion of latest mnemonic value retrival.
|
protected java.util.concurrent.locks.ReadWriteLock |
mnemonicDataLock
Mnemonic variables lock.
|
protected long |
mnemonicReadPending
Mnemonic read time key of (last) pending read.
|
protected long |
mnemonicTime
Time "key" (Java) if when last mnemonic retrival.
|
protected java.lang.Object |
mnemonicValue
Value of latest mnemonic value retrival.
|
protected java.lang.Object |
mnemonicValueRetrival
Mnemonic read lock (dummy object).
|
protected java.util.Map |
monitors
List of all property monitors (needed on property destruction).
|
protected java.lang.Class |
propertyType
Property
Class type. |
description, format, resolution, unitscharacteristicModelImpl, name, parentComponent, propertyRefDONE_TYPE, WORKING_TYPE| Constructor and Description |
|---|
CommonPropertyImpl(java.lang.Class propertyType,
java.lang.String name,
CharacteristicComponentImpl parentComponent)
Constructor with memory data access.
|
CommonPropertyImpl(java.lang.Class propertyType,
java.lang.String name,
CharacteristicComponentImpl parentComponent,
DataAccess dataAccess)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addValueToHistory(java.lang.Object value,
long timestamp)
Add value to the history.
|
long |
default_timer_trigger() |
void |
destroy()
Destroy property.
|
protected void |
getAsync(Callback callback,
CBDescIn desc) |
DataAccess |
getDataAccess()
Get property data access layer.
|
protected java.lang.Object |
getHistory(int lastValues,
TimeSeqHolder timeSeqHolder) |
protected java.lang.Object |
getSync(CompletionHolder completionHolder) |
long |
min_timer_trigger() |
java.lang.Object |
mnemonicValue(long keyTime,
CompletionHolder completionHolder)
Mnemonic value retrival.
|
void |
readCharacteristics()
Read property characteristics.
|
abstract java.lang.Object |
readPropertyTypeCharacteristic(java.lang.String name)
Read property type characteristic.
|
<T extends org.omg.PortableServer.Servant & OffShootOperations> |
registerMonitor(MonitorOperations monitorImpl,
T monitorServant)
Register monitor on this property (and optionally CORBA activate).
|
Monitor |
registerNonCorbaMonitor(MonitorOperations monitorImpl)
Register monitor on this property, without corba activation.
|
protected void |
setAsync(java.lang.Object value,
CBvoid callback,
CBDescIn desc) |
protected void |
setNonblocking(java.lang.Object value) |
protected Completion |
setSync(java.lang.Object value) |
void |
unregisterMonitor(MonitorOperations monitorImpl)
Unregister monitor on this property (and optionally CORBA deactivate).
|
archive_now, description, format, publish_now, resolution, set_archive, set_archiving_interval, unitscharacteristic_component_name, find_characteristic, get_all_characteristics, get_characteristic_by_name, getParentComponent, getPropertyDescriptor, getPropertyRef, name, setPropertyRefclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispatchCallbackprotected java.util.logging.Logger m_logger
protected long defaultTimerTrigger
protected long minTimerTrigger
protected java.lang.Object defaultValue
protected DataAccess dataAccess
protected java.lang.Class propertyType
Class type.protected int historySize
protected int historyPosition
protected boolean historyTurnaround
true, if values in history arrays exceed end of arrays (circular arrays).protected java.lang.Object historyValue
protected long[] historyTime
protected java.util.Map monitors
protected long mnemonicReadPending
protected java.lang.Object mnemonicValueRetrival
protected java.util.concurrent.locks.ReadWriteLock mnemonicDataLock
protected long mnemonicTime
protected java.lang.Object mnemonicValue
protected Completion mnemonicCompletion
public CommonPropertyImpl(java.lang.Class propertyType,
java.lang.String name,
CharacteristicComponentImpl parentComponent)
throws PropertyInitializationFailed
propertyType - property Class type, non-null.name - property name, non-null.parentComponent - parent component, non-null.PropertyInitializationFailed - exception is thrown on failurepublic CommonPropertyImpl(java.lang.Class propertyType,
java.lang.String name,
CharacteristicComponentImpl parentComponent,
DataAccess dataAccess)
throws PropertyInitializationFailed
propertyType - property Class type, non-null.name - property name, non-null.parentComponent - parent component, non-null.dataAccess - read-write data access to be use, non-null.PropertyInitializationFailed - exception is thrown on failurepublic void readCharacteristics()
throws PropertyInitializationFailed
readCharacteristics in class TypelessPropertyImplPropertyInitializationFailed - exception is thrown on failurepublic DataAccess getDataAccess()
public void destroy()
PropertyImpldestroy in interface Destroyabledestroy in class PropertyImplalma.ACS.PropertyImpl#destroy()public long default_timer_trigger()
alma.ACS.POperations#default_timer_trigger() public long min_timer_trigger()
alma.ACS.POperations#min_timer_trigger() public abstract java.lang.Object readPropertyTypeCharacteristic(java.lang.String name)
throws NoSuchCharacteristic
NoSuchCharacteristic - is thrown if characterstic does not exist.protected void addValueToHistory(java.lang.Object value,
long timestamp)
value - value to be added to the history.timestamp - value timestamp (OMG) to be added to the history.protected java.lang.Object getHistory(int lastValues,
TimeSeqHolder timeSeqHolder)
protected java.lang.Object getSync(CompletionHolder completionHolder)
throws AcsJException
AcsJExceptionalma.ACS.POperations#get_sync(alma.ACSErr.CompletionHolder) protected void getAsync(Callback callback,
CBDescIn desc)
alma.ACS.POperations#get_async(alma.ACS.CB, alma.ACS.CBDescIn) public <T extends org.omg.PortableServer.Servant & OffShootOperations> Monitor registerMonitor(MonitorOperations monitorImpl,
T monitorServant)
monitorImpl - monitor implementation (e.g. class implementing MonitorOperations interface).monitorServant - monitor CORBA servant (e.g. Monitornull monitor will
be treated as non-CORBA monitor and no CORBA activation will be done.
(Not sure how to correctly pass a null, now that the method uses generics. See registerNonCorbaMonitor(MonitorOperations)
for an alternative call.)null if monitorServant == null.public Monitor registerNonCorbaMonitor(MonitorOperations monitorImpl)
Note that this method was broken out from registerMonitor(MonitorOperations, Servant)
to avoid passing null as the second argument of that method, which was in conflict with the generics
definition, which in turn was added there to match the one of ContainerServices.activateOffshoot.
monitorImpl - monitor implementation (e.g. class implementing MonitorOperations interface).null if monitorServant == null.public void unregisterMonitor(MonitorOperations monitorImpl)
MonitorOperations.destroy() method.protected Completion setSync(java.lang.Object value)
throws AcsJException
AcsJExceptionalma.ACS.RWOperations#set_sync() protected void setAsync(java.lang.Object value,
CBvoid callback,
CBDescIn desc)
alma.ACS.RWOperations#get_async(, alma.ACS.CBvoid, alma.ACS.CBDescIn) protected void setNonblocking(java.lang.Object value)
alma.ACS.RWOperations#set_nonblocking() public java.lang.Object mnemonicValue(long keyTime,
CompletionHolder completionHolder)
keyTime == mnemonicTime cached mnemonic value is returned.keyTime - time (java) of mnemonic request.completionHolder - completion holder that will be given completion.
NOTE: completion is passsed by reference, so do not change its value,
copy its value before and do it on a local copygetSync