You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/dao/JDBCPathCache.java
+164Lines changed: 164 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -449,6 +449,74 @@ public String getPath(AbstractConnection conn, int id) throws SQLException {
449
449
}
450
450
}
451
451
452
+
/**
453
+
* Method to get the path of a given path id.
454
+
* <p>
455
+
* Add a cache entry during a READ operation.
456
+
* <p>
457
+
* This populates the cache only if the key does not already have a value.
458
+
* If a value already exists, the cache is left unchanged, which avoids
459
+
* unnecessary cache invalidation broadcasts in clustered environments.
460
+
*
461
+
* @param conn the database connection to use.
462
+
* @param id the path.
463
+
*
464
+
* @return the path corresponding to the given path id.
465
+
* @throws SQLException if an error occurs while obtaining the path id.
Copy file name to clipboardExpand all lines: core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/dao/JDBCResourceDAO.java
Copy file name to clipboardExpand all lines: core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/authorization/AuthorizationCache.java
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,39 @@ public void addToCache(String serverId, int tenantId, String userName,
123
123
cache.put(key, cacheEntry);
124
124
}
125
125
126
+
/**
127
+
* Add a cache entry during a READ operation.
128
+
* This populates the cache only if the key does not already have a value.
129
+
* If a value already exists, the cache is left unchanged, which avoids
130
+
* unnecessary cache invalidation broadcasts in clustered environments.
131
+
* <p>
132
+
* Adds an entry to the cache. Says whether given user or role is authorized
133
+
* or not.
134
+
*
135
+
* @param serverId unique identifier for carbon server instance
136
+
* @param userName Name of the user which was authorized. If this is null
137
+
* roleName must not be null.
138
+
* @param resourceId The resource on which user/role was authorized.
139
+
* @param action The action which user/role authorized for.
140
+
* @param isAuthorized Whether role/user was authorized or not. <code>true</code> for
Copy file name to clipboardExpand all lines: core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/authorization/JDBCAuthorizationManager.java
0 commit comments