Search in sources :

Example 1 with UnconstrainedVisibilityHandler

use of org.locationtech.geowave.core.store.data.visibility.UnconstrainedVisibilityHandler in project geowave by locationtech.

the class LegacyInternalDataAdapterWrapper method fromBinary.

@SuppressWarnings("unchecked")
@Override
public void fromBinary(final byte[] bytes) {
    ByteBuffer buffer = ByteBuffer.wrap(bytes);
    adapterId = buffer.getShort();
    byte[] adapterBytes = new byte[buffer.remaining()];
    buffer.get(adapterBytes);
    adapter = (DataTypeAdapter<T>) PersistenceUtils.fromBinary(adapterBytes);
    VisibilityHandler visibilityHandler = new UnconstrainedVisibilityHandler();
    if (adapter instanceof LegacyFeatureDataAdapter) {
        visibilityHandler = ((LegacyFeatureDataAdapter) adapter).getVisibilityHandler();
        adapter = (DataTypeAdapter<T>) ((LegacyFeatureDataAdapter) adapter).getUpdatedAdapter();
    }
    this.updatedAdapter = adapter.asInternalAdapter(adapterId, visibilityHandler);
}
Also used : LegacyFeatureDataAdapter(org.locationtech.geowave.migration.legacy.adapter.vector.LegacyFeatureDataAdapter) UnconstrainedVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.UnconstrainedVisibilityHandler) VisibilityHandler(org.locationtech.geowave.core.store.api.VisibilityHandler) UnconstrainedVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.UnconstrainedVisibilityHandler) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 VisibilityHandler (org.locationtech.geowave.core.store.api.VisibilityHandler)1 UnconstrainedVisibilityHandler (org.locationtech.geowave.core.store.data.visibility.UnconstrainedVisibilityHandler)1 LegacyFeatureDataAdapter (org.locationtech.geowave.migration.legacy.adapter.vector.LegacyFeatureDataAdapter)1