public static boolean wrapOffHeapReference(Object o){
  if (o instanceof StoredObject) {
    StoredObject so=(StoredObject)o;
    if (so.hasRefCount()) {
      return true;
    }
  }
  return false;
}

public static boolean wrapOffHeapReference ( Object o ) { if ( o instanceof StoredObject ) { StoredObject so = ( StoredObject ) o ; if ( so . hasRefCount ( ) ) { return true ; } } return false ; }
returns true if the given object is off - heap and it is worth wrapping a reference to it instead of copying its data to the heap . currently all storedobject ' s with a refcount are wrapped .
