Source:
public <K, V> DiskStore<K, V> createStore(final Configuration<K, V> storeConfig, final ServiceConfiguration<?>... serviceConfigs) { if (serviceProvider == null) { throw new RuntimeException("ServiceProvider is null."); } TimeSourceConfiguration timeSourceConfig = findSingletonAmongst(TimeSourceConfiguration.class, (Object[]) serviceConfigs); TimeSource timeSource = timeSourceConfig != null ? timeSourceConfig.getTimeSource() : SystemTimeSource.INSTANCE; SerializationProvider serializationProvider = serviceProvider.findService(SerializationProvider.class); Serializer<Element> elementSerializer = serializationProvider.createSerializer(Element.class, storeConfig.getClassLoader(), DefaultSerializationProviderConfiguration.find(DefaultSerializationProviderConfiguration.Type.KEY, serviceConfigs)); Serializer<Serializable> objectSerializer = serializationProvider.createSerializer(Serializable.class, storeConfig.getClassLoader(), DefaultSerializationProviderConfiguration.find(DefaultSerializationProviderConfiguration.Type.VALUE, serviceConfigs)); Object identifier; if(storeConfig instanceof PersistentStoreConfiguration<?, ?, ?>) { identifier = ((PersistentStoreConfiguration) storeConfig).getIdentifier(); } else { throw new IllegalArgumentException("Store.Configuration for DiskStore should implement Store.PersistentStoreConfiguration"); } LocalPersistenceService localPersistenceService = serviceProvider.findService(LocalPersistenceService.class); DiskStore<K, V> diskStore = new DiskStore<K, V>(storeConfig, localPersistenceService.getDataFile(identifier), localPersistenceService.getIndexFile(identifier), timeSource, elementSerializer, objectSerializer); createdStores.add(diskStore); return diskStore; }

Target:
public <K, V> DiskStore<K, V> createStore(final Configuration<K, V> storeConfig, final ServiceConfiguration<?>... serviceConfigs) { if (serviceProvider == null) { throw new RuntimeException("ServiceProvider is null."); } TimeSourceConfiguration timeSourceConfig = findSingletonAmongst(TimeSourceConfiguration.class, (Object[]) serviceConfigs); TimeSource timeSource = timeSourceConfig != null ? timeSourceConfig.getTimeSource() : SystemTimeSource.INSTANCE; SerializationProvider serializationProvider = serviceProvider.findService(SerializationProvider.class); Serializer<Element> elementSerializer = serializationProvider.createKeySerializer(Element.class, storeConfig.getClassLoader(), serviceConfigs); Serializer<Serializable> objectSerializer = serializationProvider.createValueSerializer(Serializable.class, storeConfig.getClassLoader(), serviceConfigs); Object identifier; if(storeConfig instanceof PersistentStoreConfiguration<?, ?, ?>) { identifier = ((PersistentStoreConfiguration) storeConfig).getIdentifier(); } else { throw new IllegalArgumentException("Store.Configuration for DiskStore should implement Store.PersistentStoreConfiguration"); } LocalPersistenceService localPersistenceService = serviceProvider.findService(LocalPersistenceService.class); DiskStore<K, V> diskStore = new DiskStore<K, V>(storeConfig, localPersistenceService.getDataFile(identifier), localPersistenceService.getIndexFile(identifier), timeSource, elementSerializer, objectSerializer); createdStores.add(diskStore); return diskStore; }