1

We are trying to implement a Gemfire cache using Spring-data-Gemfire with an Oracle backed database.

However, I am not able to to update the database from Gemfire using Oracle sequencer. See: How can I get a unique long from Gemfire?

I found an example of a Key generator @: https://github.com/Pivotal-Field-Engineering/gemfire-fe/tree/master/gemfire-utils/gemfire-keyfw but am not really sure how to implement this for a Long id.

Are there any ways to do this or unit tests I could refer to? Or, is there any other way I could implement this?

Any help would be appreciated, thanks.

Community
  • 1
  • 1
John Sylvester
  • 257
  • 1
  • 2
  • 8

1 Answers1

0

two potential solutions are

If you need a unique key, you could store a UUID String

or

If it needs to be sequential, you could store a counter in a Gemfire Region. Every time you do an insert you get the current sequence from the Gemfire region, do the insert and then increment the counter.

mross1080
  • 144
  • 1
  • 7