com.bagri.server.hazelcast.task.schema.SchemaMemberExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bagri-server-hazelcast Show documentation
Show all versions of bagri-server-hazelcast Show documentation
Bagri DB Cache: Hazelcast implementation
The newest version!
package com.bagri.server.hazelcast.task.schema;
import static com.bagri.server.hazelcast.serialize.TaskSerializationFactory.cli_ExtractSchemaMemberTask;
import static com.bagri.server.hazelcast.util.HazelcastUtils.findSchemaInstance;
import java.util.concurrent.Callable;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.Member;
//@SpringAware
public class SchemaMemberExtractor extends SchemaProcessingTask implements Callable {
public SchemaMemberExtractor() {
super();
}
public SchemaMemberExtractor(String schemaName) {
super(schemaName);
}
@Override
public String call() throws Exception {
logger.trace("call.enter; schema: {}", schemaName);
HazelcastInstance hz = findSchemaInstance(schemaName);
Member member = hz.getCluster().getLocalMember();
String result = member.getUuid();
logger.trace("call.exit; returning: {} for member: {}", result, member);
return result;
}
@Override
public int getId() {
return cli_ExtractSchemaMemberTask;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy