DATAKV-101 - Favor Iterable over Collection types for KeyValueOperations.
Change return types for Adapter and Operations from Collection types to Iterable. Added count(keyspace) to KeyValueAdapter. Original pull request: #8.
This commit is contained in:
committed by
Thomas Darimont
parent
16dc4b5e7d
commit
952a901164
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -104,6 +104,15 @@ public class MapKeyValueAdapter extends AbstractKeyValueAdapter {
|
||||
return get(id, keyspace) != null;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.keyvalue.core.KeyValueAdapter#count(java.io.Serializable)
|
||||
*/
|
||||
@Override
|
||||
public long count(Serializable keyspace) {
|
||||
return getKeySpaceMap(keyspace).size();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.keyvalue.core.KeyValueAdapter#get(java.io.Serializable, java.io.Serializable)
|
||||
|
||||
Reference in New Issue
Block a user