org.onebusaway.transit_data_federation.services.serialization
Class EntryIdAndCallback<K,T>
java.lang.Object
org.onebusaway.transit_data_federation.services.serialization.EntryIdAndCallback<K,T>
- Type Parameters:
K
- the id typeT
- the callback result type
public class EntryIdAndCallback<K,T>
- extends Object
A sort of delayed-binding mechanism to help with serializing large, highly
connected graphs of Java objects where you usually get a stack-depth
exception when the default DFS Java serialization mechanism does its thing.
This support class is to help where you replace your object references with
id references in a custom object serialization routine. Then you also have a
callback that repopulates the actual object reference upon deserialization.
- Author:
- bdferris
- See Also:
TransitGraphImpl
,
WalkPlannerGraphImpl
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntryIdAndCallback
public EntryIdAndCallback(K id,
EntryCallback<T> callback)
getId
public K getId()
getCallback
public EntryCallback<T> getCallback()
Copyright © 2012 OneBusAway. All Rights Reserved.