@Test( expected = UnsupportedOperationException.class ) public void loadAscendingHistory() throws ConnectionException { final Id applicationId = new SimpleId( "application" ); final String name = "test"; ApplicationScope context = new ApplicationScopeImpl( applicationId ); final Id entityId = new SimpleId( UUIDGenerator.newTimeUUID(), name ); final UUID version1 = UUIDGenerator.newTimeUUID(); serializationStrategy.loadAscendingHistory( context, entityId, version1, 20 ); }
@Override public Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId, final UUID version, final int fetchSize ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entityId, "entity id is required" ); Preconditions.checkNotNull( version, "version is required" ); Preconditions.checkArgument( fetchSize > 0, "max Size must be greater than 0" ); throw new UnsupportedOperationException( "This version does not support loading history" ); }
MvccEntitySerializationStrategyV3Impl implements MvccEntitySerializationStrategy { @Override public Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId, final UUID version, final int fetchSize ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entityId, "entity id is required" ); Preconditions.checkNotNull( version, "version is required" ); Preconditions.checkArgument( fetchSize > 0, "max Size must be greater than 0" ); throw new UnsupportedOperationException( "This version does not support loading history" ); } }
MvccEntitySerializationStrategyV3Impl implements MvccEntitySerializationStrategy { @Override public Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId, final UUID version, final int fetchSize ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entityId, "entity id is required" ); Preconditions.checkNotNull( version, "version is required" ); Preconditions.checkArgument( fetchSize > 0, "max Size must be greater than 0" ); throw new UnsupportedOperationException( "This version does not support loading history" ); } @Inject  MvccEntitySerializationStrategyV3Impl( final Keyspace keyspace, final SerializationFig serializationFig,
                                                  final CassandraFig cassandraFig, final MetricsFactory metricsFactory ); }
MvccEntitySerializationStrategyV3Impl implements MvccEntitySerializationStrategy { @Override public Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId, final UUID version, final int fetchSize ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entityId, "entity id is required" ); Preconditions.checkNotNull( version, "version is required" ); Preconditions.checkArgument( fetchSize > 0, "max Size must be greater than 0" ); throw new UnsupportedOperationException( "This version does not support loading history" ); } @Inject  MvccEntitySerializationStrategyV3Impl( final Keyspace keyspace, final SerializationFig serializationFig,
                                                  final CassandraFig cassandraFig, final MetricsFactory metricsFactory ); @Override MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ); @Override EntitySet load( final ApplicationScope applicationScope, final Collection<Id> entityIds,
                           final UUID maxVersion ); @Override Iterator<MvccEntity> loadDescendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                       final UUID version, final int fetchSize ); @Override Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                      final UUID version, final int fetchSize ); @Override Optional<MvccEntity> load( final ApplicationScope scope, final Id entityId ); @Override MutationBatch mark( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override MutationBatch delete( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override java.util.Collection getColumnFamilies(); @Override Collection<TableDefinition> getTables(); @Override int getImplementationVersion(); }
MvccEntitySerializationStrategyV3Impl implements MvccEntitySerializationStrategy { @Override public Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId, final UUID version, final int fetchSize ) { Preconditions.checkNotNull( applicationScope, "applicationScope is required" ); Preconditions.checkNotNull( entityId, "entity id is required" ); Preconditions.checkNotNull( version, "version is required" ); Preconditions.checkArgument( fetchSize > 0, "max Size must be greater than 0" ); throw new UnsupportedOperationException( "This version does not support loading history" ); } @Inject  MvccEntitySerializationStrategyV3Impl( final Keyspace keyspace, final SerializationFig serializationFig,
                                                  final CassandraFig cassandraFig, final MetricsFactory metricsFactory ); @Override MutationBatch write( final ApplicationScope applicationScope, final MvccEntity entity ); @Override EntitySet load( final ApplicationScope applicationScope, final Collection<Id> entityIds,
                           final UUID maxVersion ); @Override Iterator<MvccEntity> loadDescendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                       final UUID version, final int fetchSize ); @Override Iterator<MvccEntity> loadAscendingHistory( final ApplicationScope applicationScope, final Id entityId,
                                                      final UUID version, final int fetchSize ); @Override Optional<MvccEntity> load( final ApplicationScope scope, final Id entityId ); @Override MutationBatch mark( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override MutationBatch delete( final ApplicationScope applicationScope, final Id entityId, final UUID version ); @Override java.util.Collection getColumnFamilies(); @Override Collection<TableDefinition> getTables(); @Override int getImplementationVersion(); final static int VERSION; }