/** * Puts the object with the given key locally. <br> * Step: <br> * 1) It finds out the bucket region for the bucket id. <br> * 2) If from step 1 it gets null, that means the bucket is re-mapped. <br> * 3) If it finds the bucket region from step 1, it tries to put the key-value on the region. <br> * 4) updateBucket2Size if bucket is on more than 1 node or else bucket listeners would take care * of size update. <br> * * @param bucketId the bucket id of the key * @param event the operation event * @param ifNew whether a create must be performed * @param ifOld whether an existing entry must be updated * @param lastModified time stamp for update operations * @throws ForceReattemptException if bucket region is null * @throws PrimaryBucketException if the bucket in this data store is not the primary bucket * @return true if put happened */ public boolean putLocally(final Integer bucketId, final EntryEventImpl event, boolean ifNew, boolean ifOld, Object expectedOldValue, boolean requireOldValue, final long lastModified) throws PrimaryBucketException, ForceReattemptException { final BucketRegion br = getInitializedBucketForId(event.getKey(), bucketId); return putLocally(br, event, ifNew, ifOld, expectedOldValue, requireOldValue, lastModified); }
@Override public boolean putEntryOnRemote(EntryEventImpl event, boolean ifNew, boolean ifOld, Object expectedOldValue, boolean requireOldValue, long lastModified, boolean overwriteDestroyed) throws DataLocationException { PartitionedRegion pr = (PartitionedRegion) event.getRegion(); return pr.getDataStore().putLocally(event.getKeyInfo().getBucketId(), event, ifNew, ifOld, expectedOldValue, requireOldValue, lastModified); }
lastModified); } else { result = this.dataStore.putLocally(br, event, ifNew, ifOld, expectedOldValue, requireOldValue, lastModified);