@Transactional @Test public void testInitializeTokensWhileAlreadyPresent() { assertThrows(UnableToClaimTokenException.class, () -> jpaTokenStore.fetchToken("test1", 1)); }
@Override public TrackingToken fetchToken(String processorName, int segment) { EntityManager entityManager = entityManagerProvider.getEntityManager(); return loadToken(processorName, segment, entityManager).getToken(serializer); }
JpaTokenStore implements TokenStore { @Override public TrackingToken fetchToken(String processorName, int segment) { EntityManager entityManager = entityManagerProvider.getEntityManager(); return loadToken(processorName, segment, entityManager).getToken(serializer); } }
JpaTokenStore implements TokenStore { @Override public TrackingToken fetchToken(String processorName, int segment) { EntityManager entityManager = entityManagerProvider.getEntityManager(); return loadToken(processorName, segment, entityManager).getToken(serializer); } protected  JpaTokenStore(Builder builder); }
JpaTokenStore implements TokenStore { @Override public TrackingToken fetchToken(String processorName, int segment) { EntityManager entityManager = entityManagerProvider.getEntityManager(); return loadToken(processorName, segment, entityManager).getToken(serializer); } protected  JpaTokenStore(Builder builder); static Builder builder(); @Override void initializeTokenSegments(String processorName, int segmentCount); @Override void initializeTokenSegments(String processorName, int segmentCount, TrackingToken initialToken); @Override void storeToken(TrackingToken token, String processorName, int segment); @Override void releaseClaim(String processorName, int segment); @Override void initializeSegment(TrackingToken token, String processorName, int segment); @Override boolean requiresExplicitSegmentInitialization(); @Override void deleteToken(String processorName, int segment); @Override TrackingToken fetchToken(String processorName, int segment); @Override void extendClaim(String processorName, int segment); @Override int[] fetchSegments(String processorName); @Override Optional<String> retrieveStorageIdentifier(); Serializer serializer(); }
JpaTokenStore implements TokenStore { @Override public TrackingToken fetchToken(String processorName, int segment) { EntityManager entityManager = entityManagerProvider.getEntityManager(); return loadToken(processorName, segment, entityManager).getToken(serializer); } protected  JpaTokenStore(Builder builder); static Builder builder(); @Override void initializeTokenSegments(String processorName, int segmentCount); @Override void initializeTokenSegments(String processorName, int segmentCount, TrackingToken initialToken); @Override void storeToken(TrackingToken token, String processorName, int segment); @Override void releaseClaim(String processorName, int segment); @Override void initializeSegment(TrackingToken token, String processorName, int segment); @Override boolean requiresExplicitSegmentInitialization(); @Override void deleteToken(String processorName, int segment); @Override TrackingToken fetchToken(String processorName, int segment); @Override void extendClaim(String processorName, int segment); @Override int[] fetchSegments(String processorName); @Override Optional<String> retrieveStorageIdentifier(); Serializer serializer();  }