|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Server.Cache.ServerCache
public abstract class ServerCache
This class is a prototype for all subclasses which implement a cache. Then, these classes have to inherit this abstract class.
| Field Summary | |
|---|---|
protected boolean |
isCompleteMainHeader
Indicates if the main header codestream is complete or no. |
protected int |
lengthOfMainHeaderSent
Contains the number of bytes of the main header that have been sent. |
protected java.util.Hashtable<java.lang.Long,java.lang.Long> |
precinctDataBinLengths
The meaning is the same as precinctDataBinOffsets, but for
lengths. |
protected java.util.Hashtable<java.lang.Long,java.lang.Long> |
precinctDataBinOffsets
It is a hash table that storages the lengths of delivered data-bins. |
| Constructor Summary | |
|---|---|
ServerCache()
|
|
| Method Summary | |
|---|---|
protected void |
addElementPrecinctDataBin(long inClassIdentifier,
long offset,
long length)
Adds offset and length. |
abstract void |
createCache(ServerLogicalTarget logicalTarget)
This method has to initialize all variables/structures that will be used in the next methods calls. |
int |
getMainHeaderSent()
Returns the number of bytes of the main header which has been sent. |
long |
getPrecinctDataBinLength(long inClassIdentifier)
Returns the length of the data-bin. |
long |
getPrecinctDataBinOffset(long inClassIdentifier)
Returns the offset of the data-bin. |
boolean |
isCompleteMainHeader()
Indicates if the main header has been sent or not. |
void |
list(java.io.PrintStream out)
Prints this Client Capabilities and Preferences fields out to the specified output stream. |
void |
reset()
Resets the variables to its initials values. |
java.lang.String |
toString()
|
abstract void |
update(java.util.ArrayList<CacheDescriptor> descriptor)
Updates the server cache with data client has sent or with data sent from the server to the client. |
void |
update(int classIdentifier,
boolean aditive,
long inClassIdentifier,
long numberOfBytes)
Updates the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int lengthOfMainHeaderSent
protected boolean isCompleteMainHeader
protected java.util.Hashtable<java.lang.Long,java.lang.Long> precinctDataBinOffsets
protected java.util.Hashtable<java.lang.Long,java.lang.Long> precinctDataBinLengths
precinctDataBinOffsets, but for
lengths.
| Constructor Detail |
|---|
public ServerCache()
| Method Detail |
|---|
public abstract void createCache(ServerLogicalTarget logicalTarget)
This method will only be called once after the object is created.
logicalTarget - public abstract void update(java.util.ArrayList<CacheDescriptor> descriptor)
public final void update(int classIdentifier,
boolean aditive,
long inClassIdentifier,
long numberOfBytes)
Class - definition in CADI.Common.Cache.CacheDescriptor#Classaditive - definition in CacheDescriptor.aditiveinClassIdentifier - definition in JPIPMessageHeader.inClassIdentifiernumberOfBytes - definition in CacheDescriptor.numberOfBytespublic final int getMainHeaderSent()
public final boolean isCompleteMainHeader()
true if the main header is complete, false
if it is not.public final long getPrecinctDataBinOffset(long inClassIdentifier)
inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifier
public final long getPrecinctDataBinLength(long inClassIdentifier)
inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifier
public void reset()
protected void addElementPrecinctDataBin(long inClassIdentifier,
long offset,
long length)
inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifieroffset - definition in JPIPMessageHeader.msgOffsetlength - definition in JPIPMessageHeader.msgLengthpublic java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||