Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Getting things to building. Code clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Mar 21, 2024
1 parent d8b59d1 commit dc448fd
Show file tree
Hide file tree
Showing 62 changed files with 498 additions and 659 deletions.
2 changes: 1 addition & 1 deletion entitydb-app/files/rules/text-match.drl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ai.philterd.entitydb.model.entity.Entity;
import com.mtnfog.entitydb.eql.filters.EqlFilters;
import ai.philterd.entitydb.eql.filters.EqlFilters;

// This is a sample rule that uses an EQL query as a condition.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ public FileAuditLogger(String systemId) throws IOException {

}

/**
* {@inheritDoc}
*/

@Override
public boolean audit(String entityId, long timestamp, String userIdentifier, AuditAction auditAction) {

Expand All @@ -84,9 +82,7 @@ public boolean audit(String entityId, long timestamp, String userIdentifier, Aud

}

/**
* {@inheritDoc}
*/

@Override
public boolean audit(String query, long timestamp, String userName) {

Expand All @@ -106,9 +102,7 @@ public boolean audit(String query, long timestamp, String userName) {

}

/**
* {@inheritDoc}
*/

@Override
public void close() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public FluentdAuditLogger(String systemId) {
super(systemId);
}

/**
* {@inheritDoc}
*/

@Override
public boolean audit(String entityId, long timestamp, String userIdentifier, AuditAction auditAction) {

Expand All @@ -65,9 +63,7 @@ public boolean audit(String entityId, long timestamp, String userIdentifier, Aud

}

/**
* {@inheritDoc}
*/

@Override
public boolean audit(String query, long timestamp, String userName) {

Expand All @@ -83,9 +79,7 @@ public boolean audit(String query, long timestamp, String userName) {

}

/**
* {@inheritDoc}
*/

@Override
public void close() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,19 @@ public MemcachedCache(MemcachedClient client, String name, int ttl) {

}

/**
* {@inheritDoc}
*/

@Override
public String getName() {
return name;
}

/**
* {@inheritDoc}
*/

@Override
public Object getNativeCache() {
return client;
}

/**
* {@inheritDoc}
*/

@Override
public ValueWrapper get(final Object key) {

Expand All @@ -101,50 +95,38 @@ public ValueWrapper get(final Object key) {

}

/**
* {@inheritDoc}
*/

@Override
public void put(final Object key, final Object value) {
client.set(key.toString(), ttl, value);
}

/**
* {@inheritDoc}
*/

@Override
public void evict(final Object key) {
client.delete(key.toString());
}

/**
* {@inheritDoc}
*/

@Override
public void clear() {
client.flush();
}

/**
* {@inheritDoc}
*/

@Override
public <T> T get(Object key, Class<T> type) {
return (T) client.get((String) key);
}

/**
* {@inheritDoc}
*/

@Override
public ValueWrapper putIfAbsent(Object key, Object value) {
client.set(key.toString(), ttl, value);
return new SimpleValueWrapper(value);
}

/**
* {@inheritDoc}
*/

@Override
public <T> T get(Object key, Callable<T> valueLoader) {
return (T) client.get((String) key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
import com.datastax.driver.core.querybuilder.Select;
import ai.philterd.entitydb.model.entity.Entity;
import ai.philterd.entitydb.entitystore.cassandra.model.CassandraStoredEntity;
import com.mtnfog.entitydb.eql.model.EntityMetadataFilter;
import com.mtnfog.entitydb.eql.model.EntityQuery;
import ai.philterd.entitydb.model.eql.EntityMetadataFilter;
import ai.philterd.entitydb.model.eql.EntityQuery;
import ai.philterd.entitydb.model.entitystore.EntityIdGenerator;
import ai.philterd.entitydb.model.entitystore.EntityStore;
import ai.philterd.entitydb.model.entitystore.QueryResult;
Expand Down Expand Up @@ -122,19 +122,15 @@ public CassandraEntityStore(Session session, String keySpace) {

}

/**
* {@inheritDoc}
*/

@Override
public String getStatus() {

return String.format("Cassandra host: %s, keyspace: %s, table: %s", host, keySpace, TABLE_NAME);

}

/**
* {@inheritDoc}
*/

@Override
public List<CassandraStoredEntity> getNonIndexedEntities(int limit) {

Expand Down Expand Up @@ -176,9 +172,7 @@ public List<CassandraStoredEntity> getNonIndexedEntities(int limit) {

}

/**
* {@inheritDoc}
*/

@Override
public boolean markEntityAsIndexed(String entityId) {

Expand Down Expand Up @@ -216,9 +210,7 @@ public boolean markEntityAsIndexed(String entityId) {

}

/**
* {@inheritDoc}
*/

@Override
public long markEntitiesAsIndexed(Collection<String> entityIds) {

Expand All @@ -238,9 +230,7 @@ public long markEntitiesAsIndexed(Collection<String> entityIds) {

}

/**
* {@inheritDoc}
*/

@Override
public String storeEntity(Entity entity, String acl) throws EntityStoreException {

Expand Down Expand Up @@ -299,9 +289,7 @@ public String storeEntity(Entity entity, String acl) throws EntityStoreException

}

/**
* {@inheritDoc}
*/

@Override
public String updateAcl(String entityId, String acl) throws EntityStoreException, NonexistantEntityException {

Expand Down Expand Up @@ -395,9 +383,7 @@ public String updateAcl(String entityId, String acl) throws EntityStoreException

}

/**
* {@inheritDoc}
*/

@Override
public Map<Entity, String> storeEntities(Set<Entity> entities, String acl) throws EntityStoreException {

Expand All @@ -415,9 +401,7 @@ public Map<Entity, String> storeEntities(Set<Entity> entities, String acl) throw

}

/**
* {@inheritDoc}
*/

@Override
public void deleteEntity(String entityId) {

Expand All @@ -429,9 +413,7 @@ public void deleteEntity(String entityId) {

}

/**
* {@inheritDoc}
*/

@Override
public List<CassandraStoredEntity> getEntitiesByIds(List<String> entityIds, boolean maskAcl) {

Expand Down Expand Up @@ -597,9 +579,7 @@ public QueryResult query(EntityQuery entityQuery) throws EntityStoreException {

}

/**
* {@inheritDoc}
*/

@Override
public CassandraStoredEntity getEntityById(String id) {

Expand Down Expand Up @@ -635,9 +615,7 @@ public CassandraStoredEntity getEntityById(String id) {

}

/**
* {@inheritDoc}
*/

@Override
public long getEntityCount() throws EntityStoreException {

Expand All @@ -664,9 +642,7 @@ public long getEntityCount() throws EntityStoreException {

}

/**
* {@inheritDoc}
*/

@Override
public long getEntityCount(String context) throws EntityStoreException {

Expand All @@ -693,9 +669,7 @@ public long getEntityCount(String context) throws EntityStoreException {

}

/**
* {@inheritDoc}
*/

@Override
public List<String> getContexts() throws EntityStoreException {

Expand All @@ -706,9 +680,7 @@ public List<String> getContexts() throws EntityStoreException {

}

/**
* {@inheritDoc}
*/

@Override
public void deleteContext(String context) throws EntityStoreException {

Expand All @@ -728,9 +700,7 @@ public void deleteContext(String context) throws EntityStoreException {

}

/**
* {@inheritDoc}
*/

@Override
public void deleteDocument(String documentId) throws EntityStoreException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ public static CassandraStoredEntity fromEntity(Entity entity, String acl) {

}

/**
* {@inheritDoc}
*/

@Override
public IndexedEntity toIndexedEntity() throws MalformedAclException {

Expand Down
Loading

0 comments on commit dc448fd

Please sign in to comment.