|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TrackingIDMap
The TrackingMap is a map designed to handle tracking numbers.
TrackingIDs can be mapped with or without an associated Object.
TrackingIDs without an Object are temporary TrackingIDs that are only required for a short period of time. These TrackingIDs have an expiry period. Once the TrackingID has expired a call to cleanup() will remove the trackingID from the map. This should keep the size of the map down to a reasonable size.
TrackingIDs with an associated Object never expire. The caller must explicitly call remove to remove them from the map.
Method Summary | |
---|---|
void |
add(java.lang.String trackingID)
Adds the given Tracking ID to the map. |
void |
add(java.lang.String trackingID,
java.lang.Object object)
Adds the given Tracking ID and object to the map. |
void |
cleanup()
Runs a clean up routine on the Tracking Map. |
void |
clear()
Clears out the Tracking ID Map. |
boolean |
exists(java.lang.String trackingID)
Determines if the given Tracking ID exists in the map. |
java.lang.Object |
get(java.lang.String trackingID)
Gets the object associated with the tracking ID. |
void |
remove(java.lang.String trackingID)
Removes the given Tracking ID from the map. |
int |
size()
Gets the size of the Tracking ID map. |
Method Detail |
---|
boolean exists(java.lang.String trackingID)
trackingID
- the Tracking ID to check for
true
if the given Tracking ID exists in the mapvoid add(java.lang.String trackingID)
trackingID
- the Tracking ID to addvoid add(java.lang.String trackingID, java.lang.Object object)
trackingID
- the Tracking ID to addobject
- the object to add keyed by the given Tracking IDvoid remove(java.lang.String trackingID)
trackingID
- the Tracking ID to removevoid cleanup()
int size()
java.lang.Object get(java.lang.String trackingID)
trackingID
- the Tracking ID whose object is to be returned
void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |