|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.AbstractObservable<Port>
com.rapidminer.operator.ports.impl.AbstractPort
public abstract class AbstractPort
Implemented by keeping a weak reference to the data that can be cleared at any time
by the garbage collector.
In addition to the week reference, this class also keeps
a hard reference to the data, freeing it when calling freeMemory().
| Field Summary |
|---|
| Fields inherited from interface com.rapidminer.operator.ports.Port |
|---|
CLEAR_ALL, CLEAR_ALL_ERRORS, CLEAR_ALL_METADATA, CLEAR_DATA, CLEAR_META_DATA_ERRORS, CLEAR_METADATA, CLEAR_REAL_METADATA, CLEAR_SIMPLE_ERRORS |
| Constructor Summary | |
|---|---|
protected |
AbstractPort(Ports<? extends Port> owner,
java.lang.String name,
boolean simulatesStack)
|
| Method Summary | ||
|---|---|---|
void |
addError(MetaDataError metaDataError)
Report an error in the current process setup. |
|
void |
clear(int clearFlags)
Clears data, meta data and errors at this port. |
|
java.util.List<QuickFix> |
collectQuickFixes()
Returns a sorted list of all quick fixes applicable for this port. |
|
void |
freeMemory()
Releases of the hard reference. |
|
IOObject |
getAnyDataOrNull()
Returns the last object delivered to the connected InputPort
or received from the connected OutputPort. |
|
|
getData()
Same as #getData(true). |
|
|
getData(java.lang.Class<T> desiredClass)
This method returns the object of the desired class or throws an UserError if no object is present or cannot be casted to the desiredClass |
|
|
getDataOrNull()
Returns the last object delivered to the connected InputPort
or received from the connected OutputPort |
|
java.util.Collection<MetaDataError> |
getErrors()
Returns the set of errors added since the last clear errors. |
|
java.lang.String |
getName()
A human readable, unique (operator scope) name for the port. |
|
Ports<? extends Port> |
getPorts()
Returns the set of ports to which this port belongs. |
|
java.lang.String |
getShortName()
Gets a three letter abbreviation of the port's name. |
|
java.lang.String |
getSpec()
Returns the string "OperatorName.PortName". |
|
boolean |
isLocked()
|
|
void |
lock()
Locks the port so port extenders do not remove the port if disconnected. |
|
protected void |
setData(IOObject object)
|
|
protected void |
setName(java.lang.String newName)
Don't use this method. |
|
boolean |
simulatesStack()
Indicates whether ExecutionUnit#autoWire() should simulate the pre RM
5.0 stack behaviour of IOContainer. |
|
java.lang.String |
toString()
|
|
void |
unlock()
|
|
| Methods inherited from class com.rapidminer.tools.AbstractObservable |
|---|
addObserver, addObserverAsFirst, fireUpdate, fireUpdate, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.ports.Port |
|---|
getDescription, getMetaData, isConnected |
| Methods inherited from interface com.rapidminer.tools.Observable |
|---|
addObserver, addObserverAsFirst, removeObserver |
| Constructor Detail |
|---|
protected AbstractPort(Ports<? extends Port> owner,
java.lang.String name,
boolean simulatesStack)
| Method Detail |
|---|
protected final void setData(IOObject object)
public final <T extends IOObject> T getData()
throws UserError
Port#getData(true).
getData in interface PortUserError - if data is missing.public final IOObject getAnyDataOrNull()
PortInputPort
or received from the connected OutputPort.
Never throws an exception.
getAnyDataOrNull in interface Port
public final <T extends IOObject> T getData(java.lang.Class<T> desiredClass)
throws UserError
Port
getData in interface PortUserError
public final <T extends IOObject> T getDataOrNull()
throws UserError
PortInputPort
or received from the connected OutputPort
getDataOrNull in interface PortUserError - If data is not of the requested type.public final java.lang.String getName()
Port
getName in interface Portpublic java.lang.String toString()
toString in class java.lang.Objectpublic Ports<? extends Port> getPorts()
Port
getPorts in interface Portpublic java.lang.String getShortName()
Port
getShortName in interface Portprotected void setName(java.lang.String newName)
Ports.renamePort(Port,String).
public void addError(MetaDataError metaDataError)
Port
addError in interface Portpublic java.util.Collection<MetaDataError> getErrors()
Port
getErrors in interface Portpublic void clear(int clearFlags)
Port
clear in interface PortclearFlags - disjunction of the CLEAR_XX constants.public java.util.List<QuickFix> collectQuickFixes()
Port
collectQuickFixes in interface Portpublic java.lang.String getSpec()
Port
getSpec in interface Portpublic boolean simulatesStack()
PortExecutionUnit#autoWire() should simulate the pre RM
5.0 stack behaviour of IOContainer. Normally, ports should return
true here. However, ports created by PortPairExtenders should
return false here, since (most of the time) they only pass data through
rather adding new IOObjects to the IOContainer.
TODO: delete
simulatesStack in interface Portpublic boolean isLocked()
isLocked in interface PortPort.lock()public void unlock()
unlock in interface PortPort.lock()public void lock()
Port
lock in interface Portpublic void freeMemory()
freeMemory in interface Port
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||