/* * (non-Javadoc) * * @see * com.basho.riak.client.raw.RawClient#store(com.basho.riak.client.RiakObject * , com.basho.riak.client.raw.StoreMeta) */ public RiakResponse store(IRiakObject riakObject, StoreMeta storeMeta) throws IOException { if (riakObject == null || riakObject.getKey() == null || riakObject.getBucket() == null) { throw new IllegalArgumentException( "object cannot be null, object's key cannot be null, object's bucket cannot be null"); } try { return convert(client.store(convert(riakObject), convert(storeMeta, riakObject))); } catch (RiakError e) { // check for conditional store failure if (MATCH_FOUND.equals(e.getMessage())) { throw new MatchFoundException(); } else if (MODIFIED.equals(e.getMessage())) { throw new ModifiedException(e); } throw e; } }