@Transactional @Test void testIdentifierInitializedOnDemand() { Optional<String> id1 = tokenStore.retrieveStorageIdentifier(); assertTrue(id1.isPresent()); Optional<String> id2 = tokenStore.retrieveStorageIdentifier(); assertTrue(id2.isPresent()); assertEquals(id1.get(), id2.get()); }
@Override public Optional<String> retrieveStorageIdentifier() throws UnableToRetrieveIdentifierException { return Optional.of(loadConfigurationToken()).map(configToken -> configToken.get("id")); }
JdbcTokenStore implements TokenStore { @Override public Optional<String> retrieveStorageIdentifier() throws UnableToRetrieveIdentifierException { return Optional.of(loadConfigurationToken()).map(configToken -> configToken.get("id")); } }
JdbcTokenStore implements TokenStore { @Override public Optional<String> retrieveStorageIdentifier() throws UnableToRetrieveIdentifierException { return Optional.of(loadConfigurationToken()).map(configToken -> configToken.get("id")); } protected  JdbcTokenStore(Builder builder); }
JdbcTokenStore implements TokenStore { @Override public Optional<String> retrieveStorageIdentifier() throws UnableToRetrieveIdentifierException { return Optional.of(loadConfigurationToken()).map(configToken -> configToken.get("id")); } protected  JdbcTokenStore(Builder builder); static Builder builder(); void createSchema(TokenTableFactory schemaFactory); @Override void initializeTokenSegments(String processorName, int segmentCount); @Override void initializeTokenSegments(String processorName, int segmentCount, TrackingToken initialToken); @Override void initializeSegment(TrackingToken token, String processorName, int segment); @Override boolean requiresExplicitSegmentInitialization(); @Override Optional<String> retrieveStorageIdentifier(); Serializer serializer(); @Override void storeToken(TrackingToken token, String processorName, int segment); @Override TrackingToken fetchToken(String processorName, int segment); @Override void releaseClaim(String processorName, int segment); @Override void deleteToken(String processorName, int segment); @Override int[] fetchSegments(String processorName); }
JdbcTokenStore implements TokenStore { @Override public Optional<String> retrieveStorageIdentifier() throws UnableToRetrieveIdentifierException { return Optional.of(loadConfigurationToken()).map(configToken -> configToken.get("id")); } protected  JdbcTokenStore(Builder builder); static Builder builder(); void createSchema(TokenTableFactory schemaFactory); @Override void initializeTokenSegments(String processorName, int segmentCount); @Override void initializeTokenSegments(String processorName, int segmentCount, TrackingToken initialToken); @Override void initializeSegment(TrackingToken token, String processorName, int segment); @Override boolean requiresExplicitSegmentInitialization(); @Override Optional<String> retrieveStorageIdentifier(); Serializer serializer(); @Override void storeToken(TrackingToken token, String processorName, int segment); @Override TrackingToken fetchToken(String processorName, int segment); @Override void releaseClaim(String processorName, int segment); @Override void deleteToken(String processorName, int segment); @Override int[] fetchSegments(String processorName);  }