public class MemoryFreedByRecIdElement extends RecordingStrategiesElement implements Poolable<MemoryFreedByRecIdElement>
| Modifier and Type | Field and Description |
|---|---|
static ObjectPool<MemoryFreedByRecIdElement> |
POOL
Defines an object pool for this class.
|
private java.lang.String |
recId
Stores the recId.
|
private long |
size
Stores the size.
|
| Modifier | Constructor and Description |
|---|---|
private |
MemoryFreedByRecIdElement()
Creates a new empty instance.
|
private |
MemoryFreedByRecIdElement(java.lang.String recId,
long size)
Creates a new instance with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
If a pool is used this method is for releasing the element from the pool.
|
MemoryFreedByRecIdElement |
create()
Creates a further instance of this instances (intended as factory method
to be executed on a prototypical instance).
|
int |
getIdentification()
Returns the unambiguous identification of the element.
|
void |
process(RecorderStrategy strategy)
Hands the information of the element to the
RecorderStrategy. |
void |
read(java.io.DataInputStream in)
Reads this instance from the given input stream.
|
void |
release()
Release this element from the pool if this instance is
Poolable. |
void |
send(java.io.DataOutputStream out)
Writes this instance to the given output stream.
|
void |
setData(java.lang.String recId,
long size)
Sets the data in one step.
|
public static final ObjectPool<MemoryFreedByRecIdElement> POOL
private java.lang.String recId
private long size
private MemoryFreedByRecIdElement()
private MemoryFreedByRecIdElement(java.lang.String recId,
long size)
recId - the recIdsize - the sizepublic void setData(java.lang.String recId,
long size)
recId - the recorder identificationsize - the size of the allocationpublic void send(java.io.DataOutputStream out)
throws java.io.IOException
send in class RecordingStrategiesElementout - the output streamjava.io.IOException - in case of any I/O error or problempublic void read(java.io.DataInputStream in)
throws java.io.IOException
read in class RecordingStrategiesElementin - the input streamjava.io.IOException - in case of any I/O error or problempublic int getIdentification()
getIdentification in class RecordingStrategiesElementpublic void process(RecorderStrategy strategy)
RecorderStrategy.process in class RecordingStrategiesElementstrategy - the RecorderStrategypublic void clear()
clear in interface Poolable<MemoryFreedByRecIdElement>clear in class RecordingStrategiesElementpublic MemoryFreedByRecIdElement create()
create in interface Poolable<MemoryFreedByRecIdElement>public void release()
Poolable.release in class RecordingStrategiesElement