org.onebusaway.transit_data_federation.services.serialization
Class EntryIdAndCallback<K,T>

java.lang.Object
  extended by org.onebusaway.transit_data_federation.services.serialization.EntryIdAndCallback<K,T>
Type Parameters:
K - the id type
T - 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

Constructor Summary
EntryIdAndCallback(K id, EntryCallback<T> callback)
           
 
Method Summary
 EntryCallback<T> getCallback()
           
 K getId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryIdAndCallback

public EntryIdAndCallback(K id,
                          EntryCallback<T> callback)
Method Detail

getId

public K getId()

getCallback

public EntryCallback<T> getCallback()


Copyright © 2012 OneBusAway. All Rights Reserved.