Skip to main content

Posts

Showing posts from February, 2016

Java Code Example For Aerospike Simple Operations [Read, Write, Delete]

                      I n the following post we will see sample java code to perform simple operation (read, write and delete Records) from Aerospike Database System. The code are self explanatory, follow the comments in code for better understanding. You only need a jar for java client which you can download from aerospike official website. Main Class import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.aerospike.client.AerospikeClient; import com.aerospike.client.AerospikeException; import com.aerospike.client.Bin; import com.aerospike.client.Host; import com.aerospike.client.Key; import com.aerospike.client.Record; import com.aerospike.client.Value; import com.aerospike.client.policy.ClientPolicy; import com.aerospike.client.policy.WritePolicy; public class Aerospike { public static void main(String... args){ //Get host Host host = new Host("127.0.0.1",3000); //create client and write policy Clien