mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
SEARCH-506: Adding an option to specify the shard id
This commit is contained in:
@@ -36,6 +36,7 @@ public enum ShardMethodEnum
|
||||
ACL_ID,
|
||||
DB_ID,
|
||||
DB_ID_RANGE,
|
||||
EXPLICIT_ID,
|
||||
DATE,
|
||||
UNKOWN,
|
||||
PROPERTY;
|
||||
@@ -69,6 +70,9 @@ public enum ShardMethodEnum
|
||||
case "PROPERTY":
|
||||
shardMethodEnum = PROPERTY;
|
||||
break;
|
||||
case "EXPLICIT_ID":
|
||||
shardMethodEnum = EXPLICIT_ID;
|
||||
break;
|
||||
default:
|
||||
shardMethodEnum = UNKOWN;
|
||||
break;
|
||||
|
@@ -60,6 +60,13 @@ public class ShardMethodEnumTest
|
||||
{
|
||||
Assert.assertEquals(ShardMethodEnum.DB_ID, ShardMethodEnum.getShardMethod("DB_ID"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeEXPLICITID()
|
||||
{
|
||||
Assert.assertEquals(ShardMethodEnum.EXPLICIT_ID, ShardMethodEnum.getShardMethod("EXPLICIT_ID"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeDateTimeStamp()
|
||||
{
|
||||
|
Reference in New Issue
Block a user